timetracker update
This commit is contained in:
@@ -109,6 +109,26 @@ CREATE TABLE IF NOT EXISTS "public"."customer_repo_accesses" (
|
||||
);
|
||||
|
||||
|
||||
-- refresh_tokens
|
||||
CREATE TABLE IF NOT EXISTS "public"."refresh_tokens" (
|
||||
"id" SERIAL,
|
||||
"customer_id" BIGINT NOT NULL,
|
||||
"token_hash" VARCHAR(64) NOT NULL,
|
||||
"expires_at" TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
"created_at" TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
CONSTRAINT "refresh_tokens_pkey" PRIMARY KEY ("id"),
|
||||
CONSTRAINT "fk_refresh_tokens_customer" FOREIGN KEY ("customer_id") REFERENCES "public"."customers" ("id") ON DELETE CASCADE
|
||||
);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "uk_refresh_tokens_token_hash"
|
||||
ON "public"."refresh_tokens" (
|
||||
"token_hash" ASC
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS "idx_refresh_tokens_customer_id"
|
||||
ON "public"."refresh_tokens" (
|
||||
"customer_id" ASC
|
||||
);
|
||||
|
||||
|
||||
-- insert sample admin user admin@ma-al.com/Maal12345678
|
||||
INSERT INTO "public"."customers" ("id", "email", "password", "first_name", "last_name", "role", "provider", "provider_id", "avatar_url", "is_active", "email_verified", "email_verification_token", "email_verification_expires", "password_reset_token", "password_reset_expires", "last_password_reset_request", "last_login_at", "lang", "created_at", "updated_at", "deleted_at") VALUES (1, 'admin@ma-al.com', '$2a$10$Owy9DjrS0l3Fz4XoOvh5pulgmOMqdwXmb7hYE9BovnSuWS2plGr82', 'Super', 'Admin', 'admin', 'local', '', '', true, true, NULL, NULL, '', NULL, NULL, NULL, 'pl', '2026-03-02 16:55:10.25274+00', '2026-03-02 16:55:10.25274+00', NULL) ON CONFLICT DO NOTHING;
|
||||
|
||||
@@ -120,3 +140,4 @@ DROP TABLE IF EXISTS "public"."components";
|
||||
DROP TABLE IF EXISTS "public"."scopes";
|
||||
DROP TABLE IF EXISTS "public"."translations";
|
||||
DROP TABLE IF EXISTS "public"."customers";
|
||||
DROP TABLE IF EXISTS "public"."refresh_tokens";
|
||||
|
||||
Reference in New Issue
Block a user