* bskylink: scaffold service w/ initial config and schema * bskylink: implement link creation and redirects * bskylink: tidy * bskylink: tests * bskylink: tidy, add error handler * bskylink: add dockerfile * bskylink: add build * bskylink: fix some express plumbing * bskyweb: proxy fallthrough routes to link service redirects * bskyweb: build w/ link proxy * Add AASA to bskylink (#4588) --------- Co-authored-by: Hailey <me@haileyok.com>
15 lines
525 B
TypeScript
15 lines
525 B
TypeScript
import {Kysely} from 'kysely'
|
|
|
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
await db.schema
|
|
.createTable('link')
|
|
.addColumn('id', 'varchar', col => col.primaryKey())
|
|
.addColumn('type', 'smallint', col => col.notNull()) // integer enum: 1->starterpack
|
|
.addColumn('path', 'varchar', col => col.notNull())
|
|
.addUniqueConstraint('link_path_unique', ['path'])
|
|
.execute()
|
|
}
|
|
|
|
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
await db.schema.dropTable('link').execute()
|
|
}
|