This commit is contained in:
2024-08-14 15:34:06 +02:00
parent 34937fc3c9
commit 2d64c753cc
8 changed files with 191 additions and 20 deletions

View File

@@ -0,0 +1,2 @@
ALTER TABLE `verbs` DROP COLUMN `type`;--> statement-breakpoint
ALTER TABLE `words` DROP COLUMN `type`;

View File

@@ -0,0 +1,97 @@
{
"version": "6",
"dialect": "sqlite",
"id": "c9b4dfd7-934d-4278-89a0-754c3a104f66",
"prevId": "d7a2a05d-0984-4674-bbc3-35dbb9442202",
"tables": {
"verbs": {
"name": "verbs",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"verb": {
"name": "verb",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "''"
},
"translation": {
"name": "translation",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "''"
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "(CURRENT_DATE)"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"words": {
"name": "words",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"word": {
"name": "word",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "''"
},
"translation": {
"name": "translation",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "''"
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "(CURRENT_DATE)"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {}
}
}

View File

@@ -22,6 +22,13 @@
"when": 1722366523692,
"tag": "0002_amazing_khan",
"breakpoints": true
},
{
"idx": 3,
"version": "6",
"when": 1723642422742,
"tag": "0003_lovely_leo",
"breakpoints": true
}
]
}

View File

@@ -4,7 +4,6 @@ import { sql } from 'drizzle-orm'
export const verbs = sqliteTable('verbs', {
id: integer('id').primaryKey(),
verb: text('verb').default(''),
type: text('type', { enum: ['-ar', '-er', '-ir'] }),
translation: text('translation').default(''),
createdAt: text('created_at').default(sql`(CURRENT_DATE)`),
})
@@ -12,7 +11,6 @@ export const verbs = sqliteTable('verbs', {
export const words = sqliteTable('words', {
id: integer('id').primaryKey(),
word: text('word').default(''),
type: text('type').default(''),
translation: text('translation').default(''),
createdAt: text('created_at').default(sql`(CURRENT_DATE)`),
})