aboutsummaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-29 02:47:35 +0300
committerAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-29 02:47:35 +0300
commit96e2ce2e9d363a6296f9411ecb00168520258874 (patch)
tree09aa7fffe10eab84ae0edd39e570355984ba0148 /migrations
parent12ed72e4e1da181a6c87319a50d3b4142788b4c0 (diff)
Отказ от echo
Diffstat (limited to 'migrations')
-rw-r--r--migrations/1_schema.down.sql2
-rw-r--r--migrations/1_schema.up.sql27
-rw-r--r--migrations/fs.go6
3 files changed, 0 insertions, 35 deletions
diff --git a/migrations/1_schema.down.sql b/migrations/1_schema.down.sql
deleted file mode 100644
index c0a3f9d..0000000
--- a/migrations/1_schema.down.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-DROP TABLE "nodes";
--- DROP TABLE "users";
diff --git a/migrations/1_schema.up.sql b/migrations/1_schema.up.sql
deleted file mode 100644
index 2f8bc04..0000000
--- a/migrations/1_schema.up.sql
+++ /dev/null
@@ -1,27 +0,0 @@
-CREATE TABLE IF NOT EXISTS "users" (
- "id" INTEGER,
- "email" TEXT NOT NULL,
- "password" TEXT NOT NULL,
- "username" TEXT NOT NULL,
- "photo" TEXT,
- "role" INTEGER DEFAULT(0),
- PRIMARY KEY ("id" AUTOINCREMENT),
- UNIQUE ("email" COLLATE NOCASE),
- UNIQUE ("username" COLLATE NOCASE)
-);
-
-CREATE TABLE IF NOT EXISTS "nodes" (
- "id" INTEGER,
- "type" INTEGER,
- "text" TEXT,
- "author_id" INTEGER NOT NULL,
- "parent_id" INTEGER,
- "created_at" INTEGER NOT NULL,
- "updated_at" INTEGER NOT NULL,
- "deleted_at" INTEGER,
- "permission" INTEGER,
- PRIMARY KEY ("id" AUTOINCREMENT),
- FOREIGN KEY ("author_id") REFERENCES "users" ("id"),
- FOREIGN KEY ("parent_id") REFERENCES "posts" ("id")
-);
-
diff --git a/migrations/fs.go b/migrations/fs.go
deleted file mode 100644
index 91cca1c..0000000
--- a/migrations/fs.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package migrations
-
-import "embed"
-
-//go:embed *.sql
-var FS embed.FS