{page.error.message}
{/if} diff --git a/src/routes/(console)/project-[region]-[project]/databases/create.svelte b/src/routes/(console)/project-[region]-[project]/databases/create.svelte index fdc6cb95f..fbdb3d341 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/create.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/create.svelte @@ -82,7 +82,6 @@ const database = await sdk .forProject(page.params.region, page.params.project) .databases.create(databaseId, name); - await createPolicies(databaseId); showCreate = false; diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/+layout.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/+layout.svelte index 5053513f9..d743680f2 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/+layout.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/+layout.svelte @@ -8,13 +8,13 @@ registerSearchers, updateCommandGroupRanks } from '$lib/commandCenter'; - import { tablesSearcher } from '$lib/commandCenter/searchers'; + import { collectionsSearcher } from '$lib/commandCenter/searchers'; import { Dependencies } from '$lib/constants'; import type { Models } from '@appwrite.io/console'; - import CreateTable from './createTable.svelte'; + import CreateCollection from './createCollection.svelte'; import { showCreate } from './store'; - import { TablesPanel } from '$lib/commandCenter/panels'; - import { canWriteTables, canWriteDatabases } from '$lib/stores/roles'; + import { CollectionsPanel } from '$lib/commandCenter/panels'; + import { canWriteCollections, canWriteDatabases } from '$lib/stores/roles'; import { showCreateBackup, showCreatePolicy } from './backups/store'; import { IconPlus } from '@appwrite.io/pink-icons-svelte'; import { currentPlan } from '$lib/stores/organization'; @@ -23,17 +23,17 @@ const project = page.params.project; const databaseId = page.params.database; - async function handleCreate(event: CustomEventThere are no rows that match your filters.
+ Sorry, we couldn't find any documents. +There are no documents that match your filters.
- {column.type} - {#if isRelationship(column)} + {attribute.type} + {#if isRelationship(attribute)} with {column?.key} + href={`${base}/project-${page.params.region}-${page.params.project}/databases/database-${databaseId}/collection-${attribute?.relatedCollection}`} + >{attribute?.key} {/if}
{/if} - {column.array ? '[]' : ''} + {attribute.array ? '[]' : ''}- Are you sure you want to delete {selectedColumn?.key} from - {$table?.name}? + Are you sure you want to delete {selectedAttribute?.key} from + {$collection?.name}?
- {#if isRelationship(selectedColumn) && selectedColumn?.twoWay} + {#if isRelationship(selectedAttribute) && selectedAttribute?.twoWay}This is a two way relationship and the corresponding relationship will also be @@ -62,8 +62,8 @@
This action is irreversible.
- {camelize($table.name)} can contain {[ + {camelize($collection.name)} can contain {[ 'oneToOne', 'manyToOne' ].includes(data.relationType) @@ -235,14 +237,14 @@ can belong to {['oneToOne', 'oneToMany'].includes(data.relationType) ? 'one' : 'many'} - {camelize($table.name)} + {camelize($collection.name)}
- Are you sure you want to delete the row from {$table.name}? + Are you sure you want to delete the document from {$collection.name}?
- {#if relColumns?.length} -This row contains the following relationships:
+ {#if relAttributes?.length} +This document contains the following relationships:
Created: {toLocaleDateTime($row.$createdAt)}
-Last updated: {toLocaleDateTime($row.$updatedAt)}
+Created: {toLocaleDateTime($doc.$createdAt)}
+Last updated: {toLocaleDateTime($doc.$updatedAt)}
+ When document security is enabled, users will be able to access documents for which they + have been granted either document or collection permissions. +
++ If document security is disabled, users can access documents only if they have collection permissions. Document permissions will be ignored. +
+Created: {toLocaleDateTime($table.$createdAt)}
-Last updated: {toLocaleDateTime($table.$updatedAt)}
+Created: {toLocaleDateTime($collection.$createdAt)}
+Last updated: {toLocaleDateTime($collection.$updatedAt)}
- {#if tableItems.length > 0} - The following tables and all data associated with {$database.name}, will be + {#if collectionItems.length > 0} + The following collections and all data associated with {$database.name}, will be permanently deleted. {:else} Are you sure you want to delete {$database.name}? {/if}
- {#if isLoadingRowsCount} + {#if isLoadingDocumentsCount}Are you sure you want to delete {$database.name}?
- {:else if tableItems.length > 0} + {:else if collectionItems.length > 0}
Once deleted, this database and its backups cannot be restored. This action is
@@ -162,7 +162,7 @@
- When row security is enabled, users will be able to access rows for which they have been
- granted either row or table permissions.
-
- If row security is disabled, users can access rows only if they have table permissions. Row permissions will be ignored.
- {$database.name}
- {$database.name}
+
+ {#await loadCollectionCount()}
+
+ {:then count}
+ {count}
+ {/await}
+
+ Collections
+