From d6f2fc3585923467aad2b1164f0f3d88561ce90e Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Thu, 21 Mar 2024 22:41:25 -0700 Subject: [PATCH] having goose run the first migration --- api/migrations/20240321194227_user_table.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 api/migrations/20240321194227_user_table.sql diff --git a/api/migrations/20240321194227_user_table.sql b/api/migrations/20240321194227_user_table.sql new file mode 100644 index 0000000..ffc627b --- /dev/null +++ b/api/migrations/20240321194227_user_table.sql @@ -0,0 +1,16 @@ +-- +goose Up +-- +goose StatementBegin +SELECT 'up SQL query'; +CREATE TABLE USERS ( + ID INTEGER PRIMARY KEY AUTOINCREMENT, + Name TEXT NOT NULL, + Hash TEXT NOT NULL, + CreatedAt DATETIME NOT NULL, + LastUpdated DATETIME NOT NULL +) +-- +goose StatementEnd +-- +goose Down +-- +goose StatementBegin +SELECT 'down SQL query'; +DROP TABLE IF EXISTS USERS; +-- +goose StatementEnd \ No newline at end of file