more work on attachments

* fix frontend env usage
This commit is contained in:
Philipinho
2024-05-22 23:24:57 +01:00
parent b06a78b6ec
commit ccf9d5d99f
31 changed files with 612 additions and 349 deletions
@@ -10,7 +10,7 @@ export async function up(db: Kysely<any>): Promise<void> {
.addColumn('name', 'varchar', (col) => col)
.addColumn('description', 'text', (col) => col)
.addColumn('slug', 'varchar', (col) => col)
.addColumn('icon', 'varchar', (col) => col)
.addColumn('logo', 'varchar', (col) => col)
.addColumn('visibility', 'varchar', (col) =>
col.defaultTo(SpaceVisibility.OPEN).notNull(),
)
@@ -15,9 +15,11 @@ export async function up(db: Kysely<any>): Promise<void> {
.addColumn('creator_id', 'uuid', (col) =>
col.references('users.id').notNull(),
)
.addColumn('page_id', 'uuid', (col) => col.references('pages.id'))
.addColumn('space_id', 'uuid', (col) => col.references('spaces.id'))
.addColumn('workspace_id', 'uuid', (col) => col.references('workspaces.id'))
.addColumn('page_id', 'uuid', (col) => col)
.addColumn('space_id', 'uuid', (col) => col)
.addColumn('workspace_id', 'uuid', (col) =>
col.references('workspaces.id').onDelete('cascade').notNull(),
)
.addColumn('created_at', 'timestamptz', (col) =>
col.notNull().defaultTo(sql`now()`),
)