From c0bc4ddd786aa68d806868b246041949f5733f1a Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Tue, 30 Jul 2024 21:17:40 +0200 Subject: [PATCH] Working --- app.vue | 24 ---- app/app.vue | 20 +++- .../database/migrations/0002_amazing_khan.sql | 1 + .../migrations/meta/0002_snapshot.json | 112 ++++++++++++++++++ server/database/migrations/meta/_journal.json | 9 +- server/database/schema.ts | 3 +- tailwind.config.ts | 25 ---- 7 files changed, 137 insertions(+), 57 deletions(-) delete mode 100644 app.vue create mode 100644 server/database/migrations/0002_amazing_khan.sql create mode 100644 server/database/migrations/meta/0002_snapshot.json delete mode 100644 tailwind.config.ts diff --git a/app.vue b/app.vue deleted file mode 100644 index 6cbad88..0000000 --- a/app.vue +++ /dev/null @@ -1,24 +0,0 @@ - diff --git a/app/app.vue b/app/app.vue index d030f73..3e75e9e 100644 --- a/app/app.vue +++ b/app/app.vue @@ -26,8 +26,8 @@ async function revealWord() {
-
-
+
+

Verbos: @@ -55,13 +55,13 @@ async function revealWord() {

-
+

Palabra: @@ -72,16 +72,24 @@ async function revealWord() {

- Tradución: + Typo:

+ {{ word.type }} +

+
+
+

+ Tradución: +

+

{{ word.translation }}

diff --git a/server/database/migrations/0002_amazing_khan.sql b/server/database/migrations/0002_amazing_khan.sql new file mode 100644 index 0000000..4500bf1 --- /dev/null +++ b/server/database/migrations/0002_amazing_khan.sql @@ -0,0 +1 @@ +ALTER TABLE `words` ADD `type` text DEFAULT ''; \ No newline at end of file diff --git a/server/database/migrations/meta/0002_snapshot.json b/server/database/migrations/meta/0002_snapshot.json new file mode 100644 index 0000000..17cca1a --- /dev/null +++ b/server/database/migrations/meta/0002_snapshot.json @@ -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": {} + } +} \ No newline at end of file diff --git a/server/database/migrations/meta/_journal.json b/server/database/migrations/meta/_journal.json index 2d67837..a2e0004 100644 --- a/server/database/migrations/meta/_journal.json +++ b/server/database/migrations/meta/_journal.json @@ -15,6 +15,13 @@ "when": 1721924389034, "tag": "0001_conscious_plazm", "breakpoints": true + }, + { + "idx": 2, + "version": "6", + "when": 1722366523692, + "tag": "0002_amazing_khan", + "breakpoints": true } ] -} +} \ No newline at end of file diff --git a/server/database/schema.ts b/server/database/schema.ts index 272c515..9b1db8d 100644 --- a/server/database/schema.ts +++ b/server/database/schema.ts @@ -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)`), }) diff --git a/tailwind.config.ts b/tailwind.config.ts deleted file mode 100644 index 834ab62..0000000 --- a/tailwind.config.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Config } from 'tailwindcss' -import typography from '@tailwindcss/typography' - -export default >{ - content: [ - './components/**/*.{vue,js,ts}', - './layouts/**/*.vue', - './pages/**/*.vue', - './composables/**/*.{js,ts}', - './plugins/**/*.{js,ts}', - './utils/**/*.{js,ts}', - './App.{js,ts,vue}', - './app.{js,ts,vue}', - './Error.{js,ts,vue}', - './error.{js,ts,vue}', - './app.config.{js,ts}', - 'content/**/*.md', - ], - theme: { - extend: { - - }, - }, - plugins: [typography], -}