diff --git a/hindki/drizzle/0001_luxuriant_iceman.sql b/hindki/drizzle/0001_luxuriant_iceman.sql new file mode 100644 index 0000000..e1640d0 --- /dev/null +++ b/hindki/drizzle/0001_luxuriant_iceman.sql @@ -0,0 +1 @@ +ALTER TABLE "words" ALTER COLUMN "type" SET NOT NULL; \ No newline at end of file diff --git a/hindki/drizzle/meta/0001_snapshot.json b/hindki/drizzle/meta/0001_snapshot.json new file mode 100644 index 0000000..fc62b20 --- /dev/null +++ b/hindki/drizzle/meta/0001_snapshot.json @@ -0,0 +1,287 @@ +{ + "id": "318667f9-2cec-43d4-9e1c-9c6ddedb8664", + "prevId": "e5ed4824-2e96-4821-84c9-c33bd5d1cda8", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.examples": { + "name": "examples", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "word_id": { + "name": "word_id", + "type": "serial", + "primaryKey": false, + "notNull": true + }, + "hindi": { + "name": "hindi", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "english": { + "name": "english", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "examples_word_id_words_id_fk": { + "name": "examples_word_id_words_id_fk", + "tableFrom": "examples", + "tableTo": "words", + "columnsFrom": [ + "word_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.see_also": { + "name": "see_also", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "word_id": { + "name": "word_id", + "type": "serial", + "primaryKey": false, + "notNull": true + }, + "reference": { + "name": "reference", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "see_also_word_id_words_id_fk": { + "name": "see_also_word_id_words_id_fk", + "tableFrom": "see_also", + "tableTo": "words", + "columnsFrom": [ + "word_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tags": { + "name": "tags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "tags_name_unique": { + "name": "tags_name_unique", + "nullsNotDistinct": false, + "columns": [ + "name" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.word_tags": { + "name": "word_tags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "word_id": { + "name": "word_id", + "type": "serial", + "primaryKey": false, + "notNull": true + }, + "tag_id": { + "name": "tag_id", + "type": "serial", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "word_tags_word_id_words_id_fk": { + "name": "word_tags_word_id_words_id_fk", + "tableFrom": "word_tags", + "tableTo": "words", + "columnsFrom": [ + "word_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "word_tags_tag_id_tags_id_fk": { + "name": "word_tags_tag_id_tags_id_fk", + "tableFrom": "word_tags", + "tableTo": "tags", + "columnsFrom": [ + "tag_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.words": { + "name": "words", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "hindi": { + "name": "hindi", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "english": { + "name": "english", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "gender": { + "name": "gender", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/hindki/drizzle/meta/_journal.json b/hindki/drizzle/meta/_journal.json index 1bf8767..3de8fb2 100644 --- a/hindki/drizzle/meta/_journal.json +++ b/hindki/drizzle/meta/_journal.json @@ -8,6 +8,13 @@ "when": 1759431829568, "tag": "0000_bouncy_demogoblin", "breakpoints": true + }, + { + "idx": 1, + "version": "7", + "when": 1759452792993, + "tag": "0001_luxuriant_iceman", + "breakpoints": true } ] } \ No newline at end of file diff --git a/hindki/src/components/AddVocabForm.tsx b/hindki/src/components/AddVocabForm.tsx index 5d783ba..dcfb7ec 100644 --- a/hindki/src/components/AddVocabForm.tsx +++ b/hindki/src/components/AddVocabForm.tsx @@ -256,15 +256,12 @@ export default function AddVocabForm() { ))} - {showNewTag && ( <> -
- +
+
-
- - + +