Initial pass at migrations

This commit is contained in:
Owen Schwartz 2024-12-25 15:49:35 -05:00
parent 29bd88ebdf
commit 2a265e5cdd
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
9 changed files with 191 additions and 26 deletions

View file

@ -356,6 +356,11 @@ export const resourceOtp = sqliteTable("resourceOtp", {
expiresAt: integer("expiresAt").notNull()
});
export const versionMigrations = sqliteTable("versionMigrations", {
version: text("version").primaryKey(),
executedAt: integer("executedAt").notNull()
});
export type Org = InferSelectModel<typeof orgs>;
export type User = InferSelectModel<typeof users>;
export type Site = InferSelectModel<typeof sites>;