1
0
mirror of https://github.com/JustKato/FreePad.git synced 2026-02-23 15:50:46 +02:00

+ Restructuring!

This commit is contained in:
2022-05-17 23:27:20 +03:00
parent 31c74620c2
commit 6268ee2b7f
52 changed files with 122 additions and 54 deletions

View File

@@ -0,0 +1 @@
DROP TABLE IF EXISTS t_posts;

12
dist/db/migrations/000001_posts.up.sql vendored Normal file
View File

@@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS `t_posts` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(256) NOT NULL DEFAULT '' COLLATE 'latin1_swedish_ci',
`content` MEDIUMTEXT NOT NULL COLLATE 'latin1_swedish_ci',
`ts` DATETIME NOT NULL DEFAULT current_timestamp(),
`ts_updated` DATETIME NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `name` (`name`) USING BTREE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
;

View File

@@ -0,0 +1 @@
DROP table t_posts;

View File

@@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS "t_posts" (
"id" INTEGER,
"name" TEXT,
"content" TEXT,
PRIMARY KEY("id" AUTOINCREMENT)
);