This commit is contained in:
2024-07-30 21:17:40 +02:00
parent 78f572d099
commit c0bc4ddd78
7 changed files with 137 additions and 57 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE `words` ADD `type` text DEFAULT '';

View File

@@ -0,0 +1,112 @@
{
"version": "6",
"dialect": "sqlite",
"id": "d7a2a05d-0984-4674-bbc3-35dbb9442202",
"prevId": "b47037ef-03cc-45d7-b297-e1d1b8dbf3fe",
"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": "''"
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"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": "''"
},
"type": {
"name": "type",
"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

@@ -15,6 +15,13 @@
"when": 1721924389034,
"tag": "0001_conscious_plazm",
"breakpoints": true
},
{
"idx": 2,
"version": "6",
"when": 1722366523692,
"tag": "0002_amazing_khan",
"breakpoints": true
}
]
}
}

View File

@@ -4,14 +4,15 @@ import { sql } from 'drizzle-orm'
export const verbs = sqliteTable('verbs', {
id: integer('id').primaryKey(),
verb: text('verb').default(''),
translation: text('translation').default(''),
type: text('type', { enum: ['-ar', '-er', '-ir'] }),
translation: text('translation').default(''),
createdAt: text('created_at').default(sql`(CURRENT_DATE)`),
})
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)`),
})