db: add baseline atlas migration
[skip ci]
This commit is contained in:
parent
eff9b1e0eb
commit
12764bc43a
12
ent/migrate/migrations/20230810162233_baseline.sql
Normal file
12
ent/migrate/migrations/20230810162233_baseline.sql
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-- Create "hib_ps" table
|
||||||
|
CREATE TABLE "hib_ps" ("id" uuid NOT NULL, "name" character varying NOT NULL, "domain" character varying NOT NULL, "breach_date" timestamptz NOT NULL, "added_date" timestamptz NOT NULL, "modified_date" timestamptz NOT NULL, "pwn_count" bigint NOT NULL, "description" character varying NOT NULL, "dataclasses" jsonb NOT NULL, "is_verified" boolean NOT NULL DEFAULT false, "is_fabricated" boolean NOT NULL DEFAULT false, "is_sensitive" boolean NOT NULL DEFAULT false, "is_retired" boolean NOT NULL DEFAULT false, "is_spam_list" boolean NOT NULL DEFAULT false, "is_malware" boolean NOT NULL DEFAULT false, "logo" character varying NOT NULL, PRIMARY KEY ("id"));
|
||||||
|
-- Create index "hib_ps_name_key" to table: "hib_ps"
|
||||||
|
CREATE UNIQUE INDEX "hib_ps_name_key" ON "hib_ps" ("name");
|
||||||
|
-- Create "setups" table
|
||||||
|
CREATE TABLE "setups" ("id" uuid NOT NULL, "set_up_at" timestamptz NOT NULL, PRIMARY KEY ("id"));
|
||||||
|
-- Create "users" table
|
||||||
|
CREATE TABLE "users" ("id" uuid NOT NULL, "username" character varying NOT NULL, "email" character varying NOT NULL, "password" bytea NOT NULL, "is_admin" boolean NOT NULL DEFAULT false, "is_active" boolean NOT NULL DEFAULT true, "created_at" timestamptz NOT NULL, "updated_at" timestamptz NOT NULL, PRIMARY KEY ("id"));
|
||||||
|
-- Create index "users_email_key" to table: "users"
|
||||||
|
CREATE UNIQUE INDEX "users_email_key" ON "users" ("email");
|
||||||
|
-- Create index "users_username_key" to table: "users"
|
||||||
|
CREATE UNIQUE INDEX "users_username_key" ON "users" ("username");
|
2
ent/migrate/migrations/atlas.sum
Normal file
2
ent/migrate/migrations/atlas.sum
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
h1:uYC15pIvdFkiTfO7WNS9BhXbpvEiqVbxrv5XALamukc=
|
||||||
|
20230810162233_baseline.sql h1:zt1JTsDsXicu34uMcu1W3rveGsy5SV7b5gJe+FCq9OM=
|
Loading…
Reference in New Issue
Block a user