mirror of
https://github.com/ArthurDanjou/spanish-learner.git
synced 2026-01-14 12:14:39 +01:00
Working
This commit is contained in:
2
server/database/migrations/0003_lovely_leo.sql
Normal file
2
server/database/migrations/0003_lovely_leo.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `verbs` DROP COLUMN `type`;--> statement-breakpoint
|
||||
ALTER TABLE `words` DROP COLUMN `type`;
|
||||
97
server/database/migrations/meta/0003_snapshot.json
Normal file
97
server/database/migrations/meta/0003_snapshot.json
Normal 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": {}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,13 @@
|
||||
"when": 1722366523692,
|
||||
"tag": "0002_amazing_khan",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 3,
|
||||
"version": "6",
|
||||
"when": 1723642422742,
|
||||
"tag": "0003_lovely_leo",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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)`),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user