diff --git a/.env.example b/.env.example
index bf090442b..fc29a596b 100644
--- a/.env.example
+++ b/.env.example
@@ -1,5 +1,5 @@
PUBLIC_CONSOLE_MODE=self-hosted
-PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt,index-lengths
+PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,column-encrypt,index-lengths
PUBLIC_APPWRITE_MULTI_REGION=false
PUBLIC_APPWRITE_ENDPOINT=http://localhost/v1
PUBLIC_STRIPE_KEY=
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 137c750f7..cfd944fa4 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -79,7 +79,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
build-args: |
"PUBLIC_CONSOLE_MODE=cloud"
- "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt,index-lengths"
+ "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,column-encrypt,index-lengths"
"PUBLIC_APPWRITE_MULTI_REGION=true"
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}"
@@ -118,7 +118,7 @@ jobs:
build-args: |
"PUBLIC_CONSOLE_MODE=self-hosted"
"PUBLIC_APPWRITE_MULTI_REGION=false"
- "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt,index-lengths"
+ "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,column-encrypt,index-lengths"
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
publish-cloud-no-regions:
@@ -156,6 +156,6 @@ jobs:
build-args: |
"PUBLIC_CONSOLE_MODE=cloud"
"PUBLIC_APPWRITE_MULTI_REGION=false"
- "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt,index-lengths"
+ "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,column-encrypt,index-lengths"
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}"
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
diff --git a/src/lib/commandCenter/panels/createColumn.svelte b/src/lib/commandCenter/panels/createColumn.svelte
index bd3bfc20d..3a3cea77f 100644
--- a/src/lib/commandCenter/panels/createColumn.svelte
+++ b/src/lib/commandCenter/panels/createColumn.svelte
@@ -1,11 +1,11 @@
diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/row-[row]/delete.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/row-[row]/delete.svelte
index f8e102e26..adef085d8 100644
--- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/row-[row]/delete.svelte
+++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/row-[row]/delete.svelte
@@ -8,7 +8,7 @@
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { Alert, Layout, Selector, Table } from '@appwrite.io/pink-svelte';
- import { attributes, collection } from '../store';
+ import { columns, collection } from '../store';
import { isRelationship, isRelationshipToMany } from './columns/store';
import type { Models } from '@appwrite.io/console';
@@ -45,7 +45,7 @@
'restrict' = 'Row cannot be deleted'
}
- $: relAttributes = $attributes?.filter(
+ $: relAttributes = $columns?.filter(
(attribute) =>
isRelationship(attribute) &&
// One-to-One are always included
diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/settings/displayName.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/settings/displayName.svelte
index 7e085d8be..af78f71f8 100644
--- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/settings/displayName.svelte
+++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/settings/displayName.svelte
@@ -7,7 +7,7 @@
import { last, symmetricDifference } from '$lib/helpers/array';
import { addNotification } from '$lib/stores/notifications';
import type { Models } from '@appwrite.io/console';
- import { attributes } from '../store';
+ import { columns } from '../store';
import { preferences } from '$lib/stores/preferences';
import { page } from '$app/state';
import { Icon, Layout } from '@appwrite.io/pink-svelte';
@@ -35,7 +35,7 @@
}
}
- $: options = ($attributes as Models.AttributeString[])
+ $: options = ($columns as Models.AttributeString[])
.filter(
(attr) =>
attr.type === 'string' && !attr?.array && !names?.some((name) => name === attr.key)
diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/store.ts b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/store.ts
index 374adf90f..8bd48ac10 100644
--- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/store.ts
+++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/store.ts
@@ -19,12 +19,12 @@ type Collection = Omit & {
};
export const collection = derived(page, ($page) => $page.data.collection as Collection);
-export const attributes = derived(
+export const columns = derived(
page,
($page) => $page.data.collection.attributes as Attributes[]
);
export const indexes = derived(page, ($page) => $page.data.collection.indexes as Models.Index[]);
-export const columns = writable([]);
+export const tableColumns = writable([]);
export const isCsvImportInProgress = writable(false);
diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/table.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/table.svelte
index 5626ea579..8e9fb90dd 100644
--- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/table.svelte
+++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/table.svelte
@@ -14,7 +14,7 @@
import type { PageData } from './$types';
import { isRelationship, isRelationshipToMany, isString } from './row-[row]/columns/store';
import RelationshipsModal from './relationshipsModal.svelte';
- import { attributes, collection, columns } from './store';
+ import { columns, collection, tableColumns } from './store';
import type { ColumnType } from '$lib/helpers/types';
import {
Tooltip,
@@ -49,7 +49,7 @@
function updateMaxWidth() {
const tableCells = Array.from(document.querySelectorAll('.less-width-truncated'));
- const visibleColumnsCount = $columns.filter((col) => !col.hide).length;
+ const visibleColumnsCount = $tableColumns.filter((col) => !col.hide).length;
const newMaxWidth = Math.max(50 - (visibleColumnsCount - 1) * 5, 25);
tableCells.forEach((cell) => {
@@ -99,7 +99,7 @@
$: selected = preferences.getCustomCollectionColumns(page.params.table);
$: {
- columns.set(
+ tableColumns.set(
$collection.attributes.map((attribute) => ({
id: attribute.key,
title: attribute.key,
@@ -151,7 +151,7 @@
'restrict' = 'Row cannot be deleted'
}
- $: relAttributes = $attributes?.filter(
+ $: relAttributes = $columns?.filter(
(attribute) =>
isRelationship(attribute) &&
// One-to-One are always included
@@ -175,13 +175,13 @@
bind:selectedRows
columns={[
{ id: '$id', width: 200 },
- ...$columns,
+ ...$tableColumns,
{ id: '$created', width: 200 },
{ id: '$updated', width: 200 }
]}>
Document ID
- {#each $columns as column}
+ {#each $tableColumns as column}
{column.title}
{/each}
Created
@@ -200,8 +200,8 @@
{/key}
- {#each $columns as { id } (id)}
- {@const attr = $attributes.find((n) => n.key === id)}
+ {#each $tableColumns as { id } (id)}
+ {@const attr = $columns.find((n) => n.key === id)}
{#if attr}
{#if isRelationship(attr)}