init - add project files
This commit is contained in:
1
migrations/0000001_init.down.sql
Normal file
1
migrations/0000001_init.down.sql
Normal file
@@ -0,0 +1 @@
|
||||
DROP TABLE "user";
|
||||
13
migrations/0000001_init.up.sql
Normal file
13
migrations/0000001_init.up.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
CREATE TABLE IF NOT EXISTS "user" (
|
||||
"id" INTEGER NOT NULL,
|
||||
"username" TEXT NOT NULL,
|
||||
"email" TEXT NOT NULL,
|
||||
"firstname" TEXT NOT NULL,
|
||||
"lastname" TEXT NOT NULL,
|
||||
"password" TEXT NOT NULL,
|
||||
"failed_attempts" INTEGER NOT NULL DEFAULT 0,
|
||||
"security_stamp" TEXT NOT NULL,
|
||||
"last_login" TEXT NOT NULL,
|
||||
"data" BLOB NOT NULL,
|
||||
PRIMARY KEY("id")
|
||||
);
|
||||
2
migrations/0000002_seed_data.down.sql
Normal file
2
migrations/0000002_seed_data.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
DELETE FROM
|
||||
"user";
|
||||
26
migrations/0000002_seed_data.up.sql
Normal file
26
migrations/0000002_seed_data.up.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
INSERT INTO
|
||||
"user" (
|
||||
"id",
|
||||
"username",
|
||||
"email",
|
||||
"firstname",
|
||||
"lastname",
|
||||
"password",
|
||||
"failed_attempts",
|
||||
"last_login",
|
||||
"security_stamp",
|
||||
"data"
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
0,
|
||||
"admin",
|
||||
"admin@adminland.org",
|
||||
"Example",
|
||||
"User",
|
||||
"$2a$10$YYljQ1vChy1v8piwBOK2GuTGofa09bXygVCnprX06jTJK6nqprE/u",
|
||||
0,
|
||||
"",
|
||||
"ss",
|
||||
""
|
||||
);
|
||||
Reference in New Issue
Block a user