@skyapp-labs/blueprint-backend-core 1.11.0 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -8
- package/dist/common/interfaces/request-user.interface.d.ts +15 -0
- package/dist/common/interfaces/request-user.interface.d.ts.map +1 -0
- package/dist/common/interfaces/request-user.interface.js +3 -0
- package/dist/common/interfaces/request-user.interface.js.map +1 -0
- package/dist/database/migrations/1779687443632-full-schema.d.ts +7 -0
- package/dist/database/migrations/1779687443632-full-schema.d.ts.map +1 -0
- package/dist/database/migrations/1779687443632-full-schema.js +130 -0
- package/dist/database/migrations/1779687443632-full-schema.js.map +1 -0
- package/dist/database/migrations/1780722826101-full-schema.d.ts +7 -0
- package/dist/database/migrations/1780722826101-full-schema.d.ts.map +1 -0
- package/dist/database/migrations/1780722826101-full-schema.js +130 -0
- package/dist/database/migrations/1780722826101-full-schema.js.map +1 -0
- package/dist/database/migrations/1781419023501-full-schema.js +6 -6
- package/dist/database/migrations/1781419023501-full-schema.js.map +1 -1
- package/dist/database/seeds/settings.seed.d.ts +2 -0
- package/dist/database/seeds/settings.seed.d.ts.map +1 -1
- package/dist/database/seeds/settings.seed.js +101 -110
- package/dist/database/seeds/settings.seed.js.map +1 -1
- package/dist/health/health.controller.d.ts +29 -0
- package/dist/health/health.controller.d.ts.map +1 -0
- package/dist/health/health.controller.js +182 -0
- package/dist/health/health.controller.js.map +1 -0
- package/dist/health/health.module.d.ts +3 -0
- package/dist/health/health.module.d.ts.map +1 -0
- package/dist/health/health.module.js +49 -0
- package/dist/health/health.module.js.map +1 -0
- package/dist/jobs/constants/delivery-errors.d.ts +2 -0
- package/dist/jobs/constants/delivery-errors.d.ts.map +1 -0
- package/dist/jobs/constants/delivery-errors.js +5 -0
- package/dist/jobs/constants/delivery-errors.js.map +1 -0
- package/dist/jobs/index.d.ts +6 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +10 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/jobs.module.d.ts +6 -0
- package/dist/jobs/jobs.module.d.ts.map +1 -0
- package/dist/jobs/jobs.module.js +62 -0
- package/dist/jobs/jobs.module.js.map +1 -0
- package/dist/jobs/processors/email.processor.d.ts +14 -0
- package/dist/jobs/processors/email.processor.d.ts.map +1 -0
- package/dist/jobs/processors/email.processor.js +67 -0
- package/dist/jobs/processors/email.processor.js.map +1 -0
- package/dist/jobs/processors/jobs.processor.d.ts +24 -0
- package/dist/jobs/processors/jobs.processor.d.ts.map +1 -0
- package/dist/jobs/processors/jobs.processor.js +114 -0
- package/dist/jobs/processors/jobs.processor.js.map +1 -0
- package/dist/jobs/queues/jobs.queue.d.ts +37 -0
- package/dist/jobs/queues/jobs.queue.d.ts.map +1 -0
- package/dist/jobs/queues/jobs.queue.js +62 -0
- package/dist/jobs/queues/jobs.queue.js.map +1 -0
- package/dist/jobs/queues/queue-names.d.ts +5 -0
- package/dist/jobs/queues/queue-names.d.ts.map +1 -0
- package/dist/jobs/queues/queue-names.js +7 -0
- package/dist/jobs/queues/queue-names.js.map +1 -0
- package/dist/jobs/templates/email-template.registry.d.ts +14 -0
- package/dist/jobs/templates/email-template.registry.d.ts.map +1 -0
- package/dist/jobs/templates/email-template.registry.js +82 -0
- package/dist/jobs/templates/email-template.registry.js.map +1 -0
- package/dist/jobs/templates/render-email-template.d.ts +3 -0
- package/dist/jobs/templates/render-email-template.d.ts.map +1 -0
- package/dist/jobs/templates/render-email-template.js +10 -0
- package/dist/jobs/templates/render-email-template.js.map +1 -0
- package/dist/modules/auth/controllers/auth.controller.d.ts +1 -1
- package/dist/modules/auth/dto/forgot-password.dto.d.ts +12 -0
- package/dist/modules/auth/dto/forgot-password.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/forgot-password.dto.js +45 -0
- package/dist/modules/auth/dto/forgot-password.dto.js.map +1 -0
- package/dist/modules/auth/dto/invite.dto.d.ts +7 -0
- package/dist/modules/auth/dto/invite.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/invite.dto.js +39 -0
- package/dist/modules/auth/dto/invite.dto.js.map +1 -0
- package/dist/modules/auth/dto/login-email.dto.d.ts +5 -0
- package/dist/modules/auth/dto/login-email.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/login-email.dto.js +26 -0
- package/dist/modules/auth/dto/login-email.dto.js.map +1 -0
- package/dist/modules/auth/dto/login-phone.dto.d.ts +6 -0
- package/dist/modules/auth/dto/login-phone.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/login-phone.dto.js +33 -0
- package/dist/modules/auth/dto/login-phone.dto.js.map +1 -0
- package/dist/modules/auth/dto/refresh-token.dto.d.ts +4 -0
- package/dist/modules/auth/dto/refresh-token.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/refresh-token.dto.js +21 -0
- package/dist/modules/auth/dto/refresh-token.dto.js.map +1 -0
- package/dist/modules/auth/dto/register-email.dto.d.ts +7 -0
- package/dist/modules/auth/dto/register-email.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/register-email.dto.js +34 -0
- package/dist/modules/auth/dto/register-email.dto.js.map +1 -0
- package/dist/modules/auth/dto/register-phone.dto.d.ts +8 -0
- package/dist/modules/auth/dto/register-phone.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/register-phone.dto.js +42 -0
- package/dist/modules/auth/dto/register-phone.dto.js.map +1 -0
- package/dist/modules/otp/dto/send-otp.dto.d.ts +11 -0
- package/dist/modules/otp/dto/send-otp.dto.d.ts.map +1 -0
- package/dist/modules/otp/dto/send-otp.dto.js +39 -0
- package/dist/modules/otp/dto/send-otp.dto.js.map +1 -0
- package/dist/modules/otp/dto/verify-email.dto.d.ts +5 -0
- package/dist/modules/otp/dto/verify-email.dto.d.ts.map +1 -0
- package/dist/modules/otp/dto/verify-email.dto.js +26 -0
- package/dist/modules/otp/dto/verify-email.dto.js.map +1 -0
- package/dist/modules/otp/dto/verify-otp.dto.d.ts +5 -0
- package/dist/modules/otp/dto/verify-otp.dto.d.ts.map +1 -0
- package/dist/modules/otp/dto/verify-otp.dto.js +27 -0
- package/dist/modules/otp/dto/verify-otp.dto.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
# [1.11.0](https://github.com/Skyapp-Labs/blueprint-backend-core/compare/v1.10.0...v1.11.0) (2026-07-01)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
### Features
|
|
5
|
-
|
|
6
|
-
* consolidate uploaded_files migration into full schema ([ed2d97f](https://github.com/Skyapp-Labs/blueprint-backend-core/commit/ed2d97fac4499d20a8654a2720da064b9c45aef2))
|
|
7
|
-
* release v1.10.0 — introduce Cloudflare R2 file upload module ([0b8dea1](https://github.com/Skyapp-Labs/blueprint-backend-core/commit/0b8dea136d9f33d29c2f4b9cb93f1295379527bc))
|
|
8
|
-
|
|
9
1
|
# Changelog
|
|
10
2
|
|
|
11
3
|
All notable changes to `@skyapp-labs/blueprint-backend-core` are documented here.
|
|
@@ -16,6 +8,12 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and
|
|
|
16
8
|
|
|
17
9
|
## [Unreleased]
|
|
18
10
|
|
|
11
|
+
## [1.10.1] - 2026-07-03
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **Full-schema migration** — aligned `uploaded_files` table definition with TypeORM-generated constraint and index names (`PK_e2d47e01…`, `IDX_8e04276a…`, `FK_dbd75c6a…`) and corrected create/drop ordering in the migration.
|
|
16
|
+
|
|
19
17
|
## [1.10.0] - 2026-07-01
|
|
20
18
|
|
|
21
19
|
### Added
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface RequestUser {
|
|
2
|
+
id: string;
|
|
3
|
+
fullName: string;
|
|
4
|
+
firstName: string;
|
|
5
|
+
lastName: string;
|
|
6
|
+
username?: string;
|
|
7
|
+
displayName?: string;
|
|
8
|
+
gender?: string;
|
|
9
|
+
phoneNumber?: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
countryCode?: string;
|
|
12
|
+
photoUrl?: string;
|
|
13
|
+
roles: string[];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=request-user.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-user.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/request-user.interface.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-user.interface.js","sourceRoot":"","sources":["../../../src/common/interfaces/request-user.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class FullSchema1779687443632 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1779687443632-full-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1779687443632-full-schema.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1779687443632-full-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,uBAAwB,YAAW,kBAAkB;IACjE,IAAI,SAA6B;IAEpB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAiL3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAsF1D"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FullSchema1779687443632 = void 0;
|
|
4
|
+
class FullSchema1779687443632 {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'FullSchema1779687443632';
|
|
7
|
+
}
|
|
8
|
+
async up(queryRunner) {
|
|
9
|
+
await queryRunner.query(`CREATE TABLE "modules" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "slug" character varying(64) NOT NULL, "name" character varying(128) NOT NULL, "description" text, CONSTRAINT "PK_7dbefd488bd96c5bf31f0ce0c95" PRIMARY KEY ("id"))`);
|
|
10
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_503404f7e2e602815906fa62e5" ON "modules" ("slug") `);
|
|
11
|
+
await queryRunner.query(`CREATE TABLE "permissions" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "module_id" uuid NOT NULL, "slug" character varying(128) NOT NULL, "name" character varying(128) NOT NULL, "description" text, CONSTRAINT "PK_920331560282b8bd21bb02290df" PRIMARY KEY ("id"))`);
|
|
12
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_d090ad82a0e97ce764c06c7b31" ON "permissions" ("slug") `);
|
|
13
|
+
await queryRunner.query(`CREATE TABLE "roles" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "slug" character varying(64) NOT NULL, "name" character varying(128) NOT NULL, "description" text, CONSTRAINT "PK_c1433d71a4838793a49dcad46ab" PRIMARY KEY ("id"))`);
|
|
14
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_881f72bac969d9a00a1a29e107" ON "roles" ("slug") `);
|
|
15
|
+
await queryRunner.query(`CREATE TABLE "user_profiles" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "first_name" character varying, "last_name" character varying, "display_name" character varying, "username" character varying, "photo_url" character varying, "cover_photo_url" character varying, "bio" text, "date_of_birth" date, "gender" character varying(50), "occupation" character varying(100), "skills" text array, "address" jsonb, "language_code" character varying(10), "timezone" character varying(100), "last_known_timezone" character varying(100), "currency_code" character varying(10), "website_url" character varying, "is_public" boolean NOT NULL DEFAULT true, "is_verified" boolean NOT NULL DEFAULT false, "onboarding_step" integer NOT NULL DEFAULT '0', "is_profile_completed" boolean NOT NULL DEFAULT false, "public_metadata" jsonb, "private_metadata" jsonb, CONSTRAINT "REL_6ca9503d77ae39b4b5a6cc3ba8" UNIQUE ("user_id"), CONSTRAINT "PK_1ec6662219f4605723f1e41b6cb" PRIMARY KEY ("id"))`);
|
|
16
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_6ca9503d77ae39b4b5a6cc3ba8" ON "user_profiles" ("user_id") `);
|
|
17
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_7bdaa0714f4c1087a926a2d836" ON "user_profiles" ("username") `);
|
|
18
|
+
await queryRunner.query(`CREATE TYPE "public"."users_status_enum" AS ENUM('active', 'pending', 'invited', 'revoked', 'suspended')`);
|
|
19
|
+
await queryRunner.query(`CREATE TABLE "users" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "uid" character varying, "phone_number" character varying, "email" character varying, "country_code" character varying(10), "is_phone_verified" boolean NOT NULL DEFAULT false, "phone_verified_at" TIMESTAMP WITH TIME ZONE, "is_email_verified" boolean NOT NULL DEFAULT false, "email_verified_at" TIMESTAMP WITH TIME ZONE, "password_hash" character varying, "pin_hash" character varying, "password_updated_at" TIMESTAMP WITH TIME ZONE, "pin_updated_at" TIMESTAMP WITH TIME ZONE, "failed_login_attempts" integer NOT NULL DEFAULT '0', "locked_until" TIMESTAMP WITH TIME ZONE, "status" "public"."users_status_enum" NOT NULL DEFAULT 'active', "is_active" boolean NOT NULL DEFAULT true, "last_login_at" TIMESTAMP WITH TIME ZONE, "last_seen_at" TIMESTAMP WITH TIME ZONE, "last_active_at" TIMESTAMP WITH TIME ZONE, "invite_token_hash" character varying, "invite_token_prefix" character varying(12), "invite_token_expires_at" TIMESTAMP WITH TIME ZONE, "invited_by_id" character varying, "invited_at" TIMESTAMP WITH TIME ZONE, "deletion_requested_at" TIMESTAMP WITH TIME ZONE, CONSTRAINT "UQ_6e20ce1edf0678a09f1963f9587" UNIQUE ("uid"), CONSTRAINT "UQ_17d1817f241f10a3dbafb169fd2" UNIQUE ("phone_number"), CONSTRAINT "UQ_97672ac88f789774dd47f7c8be3" UNIQUE ("email"), CONSTRAINT "PK_a3ffb1c0c8416b9fc6f907b7433" PRIMARY KEY ("id"))`);
|
|
20
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_17d1817f241f10a3dbafb169fd" ON "users" ("phone_number") `);
|
|
21
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_97672ac88f789774dd47f7c8be" ON "users" ("email") `);
|
|
22
|
+
await queryRunner.query(`CREATE INDEX "IDX_d551f6c0dca3ad0908c5b05e6f" ON "users" ("invite_token_prefix") `);
|
|
23
|
+
await queryRunner.query(`CREATE TABLE "app_settings" ("key" character varying(100) NOT NULL, "value" text NOT NULL, "type" character varying(20) NOT NULL DEFAULT 'string', "group" character varying(50) NOT NULL, "description" text, "schema" json, "is_editable" boolean NOT NULL DEFAULT true, "updated_by_id" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), CONSTRAINT "PK_975c2db59c65c05fd9c6b63a2ab" PRIMARY KEY ("key")); COMMENT ON COLUMN "app_settings"."schema" IS 'Schema for the value field (used for complex types like arrays or objects)'`);
|
|
24
|
+
await queryRunner.query(`CREATE TYPE "public"."refresh_tokens_revoke_reason_enum" AS ENUM('rotated', 'logout', 'reuse_detected', 'admin')`);
|
|
25
|
+
await queryRunner.query(`CREATE TABLE "refresh_tokens" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "token_hash" character varying NOT NULL, "family_id" character varying NOT NULL, "provider_refresh_token" character varying, "device_info" character varying, "ip_address" character varying, "expires_at" TIMESTAMP WITH TIME ZONE NOT NULL, "is_revoked" boolean NOT NULL DEFAULT false, "revoke_reason" "public"."refresh_tokens_revoke_reason_enum", CONSTRAINT "PK_7d8bee0204106019488c4c50ffa" PRIMARY KEY ("id"))`);
|
|
26
|
+
await queryRunner.query(`CREATE INDEX "IDX_3ddc983c5f7bcf132fd8732c3f" ON "refresh_tokens" ("user_id") `);
|
|
27
|
+
await queryRunner.query(`CREATE INDEX "IDX_d5e27da0cd39bc3bb2811fc8ba" ON "refresh_tokens" ("family_id") `);
|
|
28
|
+
await queryRunner.query(`CREATE TYPE "public"."notifications_type_enum" AS ENUM('balance_updated', 'transaction_created', 'status_changed', 'wallet_created', 'system', 'promo')`);
|
|
29
|
+
await queryRunner.query(`CREATE TABLE "notifications" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "title" character varying NOT NULL, "body" character varying NOT NULL, "type" "public"."notifications_type_enum" NOT NULL DEFAULT 'system', "data" jsonb, "is_read" boolean NOT NULL DEFAULT false, "read_at" TIMESTAMP WITH TIME ZONE, CONSTRAINT "PK_6a72c3c0f683f6462415e653c3a" PRIMARY KEY ("id"))`);
|
|
30
|
+
await queryRunner.query(`CREATE INDEX "IDX_310667f935698fcd8cb319113a" ON "notifications" ("user_id", "created_at") `);
|
|
31
|
+
await queryRunner.query(`CREATE INDEX "IDX_af08fad7c04bb85403970afdc1" ON "notifications" ("user_id", "is_read") `);
|
|
32
|
+
await queryRunner.query(`CREATE TYPE "public"."device_tokens_device_type_enum" AS ENUM('ios', 'android', 'web')`);
|
|
33
|
+
await queryRunner.query(`CREATE TABLE "device_tokens" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "fcm_token" character varying NOT NULL, "device_type" "public"."device_tokens_device_type_enum" NOT NULL, "device_name" character varying, "is_active" boolean NOT NULL DEFAULT true, "last_used_at" TIMESTAMP WITH TIME ZONE, CONSTRAINT "PK_84700be257607cfb1f9dc2e52c3" PRIMARY KEY ("id"))`);
|
|
34
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a64b71c267aaf93a3f195f4365" ON "device_tokens" ("user_id", "fcm_token") `);
|
|
35
|
+
await queryRunner.query(`CREATE TYPE "public"."invitations_delivery_channel_enum" AS ENUM('email', 'sms', 'link')`);
|
|
36
|
+
await queryRunner.query(`CREATE TYPE "public"."invitations_invited_by_type_enum" AS ENUM('user', 'admin', 'system', 'service')`);
|
|
37
|
+
await queryRunner.query(`CREATE TYPE "public"."invitations_status_enum" AS ENUM('pending', 'accepted', 'expired', 'revoked', 'cancelled')`);
|
|
38
|
+
await queryRunner.query(`CREATE TABLE "invitations" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "target_email" character varying, "target_phone" character varying, "invited_by_user_id" uuid, "context_type" character varying(64), "context_id" character varying, "accepted_at" TIMESTAMP WITH TIME ZONE, "accepted_by_user_id" uuid, "token_prefix" character varying(12) NOT NULL, "token_hash" character varying NOT NULL, "delivery_channel" "public"."invitations_delivery_channel_enum" NOT NULL DEFAULT 'email', "invited_by_type" "public"."invitations_invited_by_type_enum" NOT NULL DEFAULT 'user', "role_ids" uuid array NOT NULL DEFAULT '{}', "permissions" text array NOT NULL DEFAULT '{}', "metadata" jsonb, "status" "public"."invitations_status_enum" NOT NULL DEFAULT 'pending', "expires_at" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_5dec98cfdfd562e4ad3648bbb07" PRIMARY KEY ("id"))`);
|
|
39
|
+
await queryRunner.query(`CREATE INDEX "IDX_db9ecec7b394a36c1dce10899f" ON "invitations" ("token_prefix") `);
|
|
40
|
+
await queryRunner.query(`CREATE INDEX "IDX_56ddec1301436cff2b5da59a95" ON "invitations" ("target_phone", "status") `);
|
|
41
|
+
await queryRunner.query(`CREATE INDEX "IDX_d75e7dd9c578daad015e5e062d" ON "invitations" ("target_email", "status") `);
|
|
42
|
+
await queryRunner.query(`CREATE INDEX "IDX_50018bf1b8a176727feba0c46f" ON "invitations" ("context_type", "context_id") `);
|
|
43
|
+
await queryRunner.query(`CREATE TABLE "password_reset_tokens" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "user_id" uuid NOT NULL, "used_at" TIMESTAMP WITH TIME ZONE NOT NULL, "ip_address" character varying, CONSTRAINT "PK_d16bebd73e844c48bca50ff8d3d" PRIMARY KEY ("id"))`);
|
|
44
|
+
await queryRunner.query(`CREATE INDEX "IDX_52ac39dd8a28730c63aeb428c9" ON "password_reset_tokens" ("user_id") `);
|
|
45
|
+
await queryRunner.query(`CREATE TABLE "admin_logs" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "actor_id" uuid, "action" character varying NOT NULL, "target_type" character varying, "target_id" uuid, "metadata" jsonb, "ip_address" character varying, CONSTRAINT "PK_1bd116497b175ab12373dcb362b" PRIMARY KEY ("id"))`);
|
|
46
|
+
await queryRunner.query(`CREATE INDEX "IDX_3df363f383075d397bfde7443b" ON "admin_logs" ("actor_id") `);
|
|
47
|
+
await queryRunner.query(`CREATE INDEX "IDX_b4a4d9acc93bed6c9143a54870" ON "admin_logs" ("action") `);
|
|
48
|
+
await queryRunner.query(`CREATE TABLE "role_permissions" ("role_id" uuid NOT NULL, "permission_id" uuid NOT NULL, CONSTRAINT "PK_25d24010f53bb80b78e412c9656" PRIMARY KEY ("role_id", "permission_id"))`);
|
|
49
|
+
await queryRunner.query(`CREATE INDEX "IDX_178199805b901ccd220ab7740e" ON "role_permissions" ("role_id") `);
|
|
50
|
+
await queryRunner.query(`CREATE INDEX "IDX_17022daf3f885f7d35423e9971" ON "role_permissions" ("permission_id") `);
|
|
51
|
+
await queryRunner.query(`CREATE TABLE "user_roles" ("user_id" uuid NOT NULL, "role_id" uuid NOT NULL, CONSTRAINT "PK_23ed6f04fe43066df08379fd034" PRIMARY KEY ("user_id", "role_id"))`);
|
|
52
|
+
await queryRunner.query(`CREATE INDEX "IDX_87b8888186ca9769c960e92687" ON "user_roles" ("user_id") `);
|
|
53
|
+
await queryRunner.query(`CREATE INDEX "IDX_b23c65e50a758245a33ee35fda" ON "user_roles" ("role_id") `);
|
|
54
|
+
await queryRunner.query(`ALTER TABLE "permissions" ADD CONSTRAINT "FK_738f46bb9ac6ea356f1915835d0" FOREIGN KEY ("module_id") REFERENCES "modules"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
55
|
+
await queryRunner.query(`ALTER TABLE "user_profiles" ADD CONSTRAINT "FK_6ca9503d77ae39b4b5a6cc3ba88" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
56
|
+
await queryRunner.query(`ALTER TABLE "refresh_tokens" ADD CONSTRAINT "FK_3ddc983c5f7bcf132fd8732c3f4" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
57
|
+
await queryRunner.query(`ALTER TABLE "notifications" ADD CONSTRAINT "FK_9a8a82462cab47c73d25f49261f" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
58
|
+
await queryRunner.query(`ALTER TABLE "device_tokens" ADD CONSTRAINT "FK_17e1f528b993c6d55def4cf5bea" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
59
|
+
await queryRunner.query(`ALTER TABLE "invitations" ADD CONSTRAINT "FK_e686620e08c4661e70a6b39b94a" FOREIGN KEY ("invited_by_user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
|
|
60
|
+
await queryRunner.query(`ALTER TABLE "invitations" ADD CONSTRAINT "FK_8f29b080d4120512e9f99f2dbb1" FOREIGN KEY ("accepted_by_user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
|
|
61
|
+
await queryRunner.query(`ALTER TABLE "password_reset_tokens" ADD CONSTRAINT "FK_52ac39dd8a28730c63aeb428c9c" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
62
|
+
await queryRunner.query(`ALTER TABLE "admin_logs" ADD CONSTRAINT "FK_3df363f383075d397bfde7443b2" FOREIGN KEY ("actor_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
|
|
63
|
+
await queryRunner.query(`ALTER TABLE "role_permissions" ADD CONSTRAINT "FK_178199805b901ccd220ab7740ec" FOREIGN KEY ("role_id") REFERENCES "roles"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
64
|
+
await queryRunner.query(`ALTER TABLE "role_permissions" ADD CONSTRAINT "FK_17022daf3f885f7d35423e9971e" FOREIGN KEY ("permission_id") REFERENCES "permissions"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
65
|
+
await queryRunner.query(`ALTER TABLE "user_roles" ADD CONSTRAINT "FK_87b8888186ca9769c960e926870" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
66
|
+
await queryRunner.query(`ALTER TABLE "user_roles" ADD CONSTRAINT "FK_b23c65e50a758245a33ee35fda1" FOREIGN KEY ("role_id") REFERENCES "roles"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
67
|
+
}
|
|
68
|
+
async down(queryRunner) {
|
|
69
|
+
await queryRunner.query(`ALTER TABLE "user_roles" DROP CONSTRAINT "FK_b23c65e50a758245a33ee35fda1"`);
|
|
70
|
+
await queryRunner.query(`ALTER TABLE "user_roles" DROP CONSTRAINT "FK_87b8888186ca9769c960e926870"`);
|
|
71
|
+
await queryRunner.query(`ALTER TABLE "role_permissions" DROP CONSTRAINT "FK_17022daf3f885f7d35423e9971e"`);
|
|
72
|
+
await queryRunner.query(`ALTER TABLE "role_permissions" DROP CONSTRAINT "FK_178199805b901ccd220ab7740ec"`);
|
|
73
|
+
await queryRunner.query(`ALTER TABLE "admin_logs" DROP CONSTRAINT "FK_3df363f383075d397bfde7443b2"`);
|
|
74
|
+
await queryRunner.query(`ALTER TABLE "password_reset_tokens" DROP CONSTRAINT "FK_52ac39dd8a28730c63aeb428c9c"`);
|
|
75
|
+
await queryRunner.query(`ALTER TABLE "invitations" DROP CONSTRAINT "FK_8f29b080d4120512e9f99f2dbb1"`);
|
|
76
|
+
await queryRunner.query(`ALTER TABLE "invitations" DROP CONSTRAINT "FK_e686620e08c4661e70a6b39b94a"`);
|
|
77
|
+
await queryRunner.query(`ALTER TABLE "device_tokens" DROP CONSTRAINT "FK_17e1f528b993c6d55def4cf5bea"`);
|
|
78
|
+
await queryRunner.query(`ALTER TABLE "notifications" DROP CONSTRAINT "FK_9a8a82462cab47c73d25f49261f"`);
|
|
79
|
+
await queryRunner.query(`ALTER TABLE "refresh_tokens" DROP CONSTRAINT "FK_3ddc983c5f7bcf132fd8732c3f4"`);
|
|
80
|
+
await queryRunner.query(`ALTER TABLE "user_profiles" DROP CONSTRAINT "FK_6ca9503d77ae39b4b5a6cc3ba88"`);
|
|
81
|
+
await queryRunner.query(`ALTER TABLE "permissions" DROP CONSTRAINT "FK_738f46bb9ac6ea356f1915835d0"`);
|
|
82
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_b23c65e50a758245a33ee35fda"`);
|
|
83
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_87b8888186ca9769c960e92687"`);
|
|
84
|
+
await queryRunner.query(`DROP TABLE "user_roles"`);
|
|
85
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_17022daf3f885f7d35423e9971"`);
|
|
86
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_178199805b901ccd220ab7740e"`);
|
|
87
|
+
await queryRunner.query(`DROP TABLE "role_permissions"`);
|
|
88
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_b4a4d9acc93bed6c9143a54870"`);
|
|
89
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_3df363f383075d397bfde7443b"`);
|
|
90
|
+
await queryRunner.query(`DROP TABLE "admin_logs"`);
|
|
91
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_52ac39dd8a28730c63aeb428c9"`);
|
|
92
|
+
await queryRunner.query(`DROP TABLE "password_reset_tokens"`);
|
|
93
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_50018bf1b8a176727feba0c46f"`);
|
|
94
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_d75e7dd9c578daad015e5e062d"`);
|
|
95
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_56ddec1301436cff2b5da59a95"`);
|
|
96
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_db9ecec7b394a36c1dce10899f"`);
|
|
97
|
+
await queryRunner.query(`DROP TABLE "invitations"`);
|
|
98
|
+
await queryRunner.query(`DROP TYPE "public"."invitations_status_enum"`);
|
|
99
|
+
await queryRunner.query(`DROP TYPE "public"."invitations_invited_by_type_enum"`);
|
|
100
|
+
await queryRunner.query(`DROP TYPE "public"."invitations_delivery_channel_enum"`);
|
|
101
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_a64b71c267aaf93a3f195f4365"`);
|
|
102
|
+
await queryRunner.query(`DROP TABLE "device_tokens"`);
|
|
103
|
+
await queryRunner.query(`DROP TYPE "public"."device_tokens_device_type_enum"`);
|
|
104
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_af08fad7c04bb85403970afdc1"`);
|
|
105
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_310667f935698fcd8cb319113a"`);
|
|
106
|
+
await queryRunner.query(`DROP TABLE "notifications"`);
|
|
107
|
+
await queryRunner.query(`DROP TYPE "public"."notifications_type_enum"`);
|
|
108
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_d5e27da0cd39bc3bb2811fc8ba"`);
|
|
109
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_3ddc983c5f7bcf132fd8732c3f"`);
|
|
110
|
+
await queryRunner.query(`DROP TABLE "refresh_tokens"`);
|
|
111
|
+
await queryRunner.query(`DROP TYPE "public"."refresh_tokens_revoke_reason_enum"`);
|
|
112
|
+
await queryRunner.query(`DROP TABLE "app_settings"`);
|
|
113
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_d551f6c0dca3ad0908c5b05e6f"`);
|
|
114
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_97672ac88f789774dd47f7c8be"`);
|
|
115
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_17d1817f241f10a3dbafb169fd"`);
|
|
116
|
+
await queryRunner.query(`DROP TABLE "users"`);
|
|
117
|
+
await queryRunner.query(`DROP TYPE "public"."users_status_enum"`);
|
|
118
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_7bdaa0714f4c1087a926a2d836"`);
|
|
119
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_6ca9503d77ae39b4b5a6cc3ba8"`);
|
|
120
|
+
await queryRunner.query(`DROP TABLE "user_profiles"`);
|
|
121
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_881f72bac969d9a00a1a29e107"`);
|
|
122
|
+
await queryRunner.query(`DROP TABLE "roles"`);
|
|
123
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_d090ad82a0e97ce764c06c7b31"`);
|
|
124
|
+
await queryRunner.query(`DROP TABLE "permissions"`);
|
|
125
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_503404f7e2e602815906fa62e5"`);
|
|
126
|
+
await queryRunner.query(`DROP TABLE "modules"`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.FullSchema1779687443632 = FullSchema1779687443632;
|
|
130
|
+
//# sourceMappingURL=1779687443632-full-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1779687443632-full-schema.js","sourceRoot":"","sources":["../../../src/database/migrations/1779687443632-full-schema.ts"],"names":[],"mappings":";;;AAEA,MAAa,uBAAuB;IAApC;QACC,SAAI,GAAG,yBAAyB,CAAC;IAyQlC,CAAC;IAvQO,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CACtB,sbAAsb,CACtb,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,6EAA6E,CAC7E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,sdAAsd,CACtd,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,iFAAiF,CACjF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,obAAob,CACpb,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,2EAA2E,CAC3E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,qrCAAqrC,CACrrC,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,sFAAsF,CACtF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,uFAAuF,CACvF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,0GAA0G,CAC1G,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,yjDAAyjD,CACzjD,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,mFAAmF,CACnF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,C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,MAAM,WAAW,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACvD,MAAM,WAAW,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAClF,MAAM,WAAW,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACrD,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,WAAW,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAClE,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACtD,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QACpD,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACjD,CAAC;CACD;AA1QD,0DA0QC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class FullSchema1780722826101 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1780722826101-full-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1780722826101-full-schema.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1780722826101-full-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,uBAAwB,YAAW,kBAAkB;IACjE,IAAI,SAA6B;IAEpB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAiL3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAsF1D"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FullSchema1780722826101 = void 0;
|
|
4
|
+
class FullSchema1780722826101 {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'FullSchema1780722826101';
|
|
7
|
+
}
|
|
8
|
+
async up(queryRunner) {
|
|
9
|
+
await queryRunner.query(`CREATE TABLE "modules" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "slug" character varying(64) NOT NULL, "name" character varying(128) NOT NULL, "description" text, CONSTRAINT "PK_7dbefd488bd96c5bf31f0ce0c95" PRIMARY KEY ("id"))`);
|
|
10
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_503404f7e2e602815906fa62e5" ON "modules" ("slug") `);
|
|
11
|
+
await queryRunner.query(`CREATE TABLE "permissions" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "module_id" uuid NOT NULL, "slug" character varying(128) NOT NULL, "name" character varying(128) NOT NULL, "description" text, CONSTRAINT "PK_920331560282b8bd21bb02290df" PRIMARY KEY ("id"))`);
|
|
12
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_d090ad82a0e97ce764c06c7b31" ON "permissions" ("slug") `);
|
|
13
|
+
await queryRunner.query(`CREATE TABLE "roles" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "slug" character varying(64) NOT NULL, "name" character varying(128) NOT NULL, "description" text, CONSTRAINT "PK_c1433d71a4838793a49dcad46ab" PRIMARY KEY ("id"))`);
|
|
14
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_881f72bac969d9a00a1a29e107" ON "roles" ("slug") `);
|
|
15
|
+
await queryRunner.query(`CREATE TABLE "user_profiles" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "first_name" character varying, "last_name" character varying, "display_name" character varying, "username" character varying, "photo_url" character varying, "cover_photo_url" character varying, "bio" text, "date_of_birth" date, "gender" character varying(50), "occupation" character varying(100), "skills" text array, "address" jsonb, "language_code" character varying(10), "timezone" character varying(100), "last_known_timezone" character varying(100), "currency_code" character varying(10), "website_url" character varying, "is_public" boolean NOT NULL DEFAULT true, "is_verified" boolean NOT NULL DEFAULT false, "onboarding_step" integer NOT NULL DEFAULT '0', "is_profile_completed" boolean NOT NULL DEFAULT false, "public_metadata" jsonb, "private_metadata" jsonb, CONSTRAINT "REL_6ca9503d77ae39b4b5a6cc3ba8" UNIQUE ("user_id"), CONSTRAINT "PK_1ec6662219f4605723f1e41b6cb" PRIMARY KEY ("id"))`);
|
|
16
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_6ca9503d77ae39b4b5a6cc3ba8" ON "user_profiles" ("user_id") `);
|
|
17
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_7bdaa0714f4c1087a926a2d836" ON "user_profiles" ("username") `);
|
|
18
|
+
await queryRunner.query(`CREATE TYPE "public"."users_status_enum" AS ENUM('active', 'pending', 'invited', 'revoked', 'suspended')`);
|
|
19
|
+
await queryRunner.query(`CREATE TABLE "users" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "uid" character varying, "phone_number" character varying, "email" character varying, "country_code" character varying(10), "is_phone_verified" boolean NOT NULL DEFAULT false, "phone_verified_at" TIMESTAMP WITH TIME ZONE, "is_email_verified" boolean NOT NULL DEFAULT false, "email_verified_at" TIMESTAMP WITH TIME ZONE, "password_hash" character varying, "pin_hash" character varying, "password_updated_at" TIMESTAMP WITH TIME ZONE, "pin_updated_at" TIMESTAMP WITH TIME ZONE, "failed_login_attempts" integer NOT NULL DEFAULT '0', "locked_until" TIMESTAMP WITH TIME ZONE, "status" "public"."users_status_enum" NOT NULL DEFAULT 'active', "is_active" boolean NOT NULL DEFAULT true, "last_login_at" TIMESTAMP WITH TIME ZONE, "last_seen_at" TIMESTAMP WITH TIME ZONE, "last_active_at" TIMESTAMP WITH TIME ZONE, "invite_token_hash" character varying, "invite_token_prefix" character varying(12), "invite_token_expires_at" TIMESTAMP WITH TIME ZONE, "invited_by_id" character varying, "invited_at" TIMESTAMP WITH TIME ZONE, "deletion_requested_at" TIMESTAMP WITH TIME ZONE, CONSTRAINT "UQ_6e20ce1edf0678a09f1963f9587" UNIQUE ("uid"), CONSTRAINT "UQ_17d1817f241f10a3dbafb169fd2" UNIQUE ("phone_number"), CONSTRAINT "UQ_97672ac88f789774dd47f7c8be3" UNIQUE ("email"), CONSTRAINT "PK_a3ffb1c0c8416b9fc6f907b7433" PRIMARY KEY ("id"))`);
|
|
20
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_17d1817f241f10a3dbafb169fd" ON "users" ("phone_number") `);
|
|
21
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_97672ac88f789774dd47f7c8be" ON "users" ("email") `);
|
|
22
|
+
await queryRunner.query(`CREATE INDEX "IDX_d551f6c0dca3ad0908c5b05e6f" ON "users" ("invite_token_prefix") `);
|
|
23
|
+
await queryRunner.query(`CREATE TABLE "app_settings" ("key" character varying(100) NOT NULL, "value" text NOT NULL, "type" character varying(20) NOT NULL DEFAULT 'string', "group" character varying(50) NOT NULL, "description" text, "schema" json, "is_editable" boolean NOT NULL DEFAULT true, "updated_by_id" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), CONSTRAINT "PK_975c2db59c65c05fd9c6b63a2ab" PRIMARY KEY ("key")); COMMENT ON COLUMN "app_settings"."schema" IS 'Schema for the value field (used for complex types like arrays or objects)'`);
|
|
24
|
+
await queryRunner.query(`CREATE TYPE "public"."refresh_tokens_revoke_reason_enum" AS ENUM('rotated', 'logout', 'reuse_detected', 'admin')`);
|
|
25
|
+
await queryRunner.query(`CREATE TABLE "refresh_tokens" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "token_hash" character varying NOT NULL, "family_id" character varying NOT NULL, "provider_refresh_token" character varying, "device_info" character varying, "ip_address" character varying, "expires_at" TIMESTAMP WITH TIME ZONE NOT NULL, "is_revoked" boolean NOT NULL DEFAULT false, "revoke_reason" "public"."refresh_tokens_revoke_reason_enum", CONSTRAINT "PK_7d8bee0204106019488c4c50ffa" PRIMARY KEY ("id"))`);
|
|
26
|
+
await queryRunner.query(`CREATE INDEX "IDX_3ddc983c5f7bcf132fd8732c3f" ON "refresh_tokens" ("user_id") `);
|
|
27
|
+
await queryRunner.query(`CREATE INDEX "IDX_d5e27da0cd39bc3bb2811fc8ba" ON "refresh_tokens" ("family_id") `);
|
|
28
|
+
await queryRunner.query(`CREATE TYPE "public"."notifications_type_enum" AS ENUM('balance_updated', 'transaction_created', 'status_changed', 'wallet_created', 'system', 'promo')`);
|
|
29
|
+
await queryRunner.query(`CREATE TABLE "notifications" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "title" character varying NOT NULL, "body" character varying NOT NULL, "type" "public"."notifications_type_enum" NOT NULL DEFAULT 'system', "data" jsonb, "is_read" boolean NOT NULL DEFAULT false, "read_at" TIMESTAMP WITH TIME ZONE, CONSTRAINT "PK_6a72c3c0f683f6462415e653c3a" PRIMARY KEY ("id"))`);
|
|
30
|
+
await queryRunner.query(`CREATE INDEX "IDX_310667f935698fcd8cb319113a" ON "notifications" ("user_id", "created_at") `);
|
|
31
|
+
await queryRunner.query(`CREATE INDEX "IDX_af08fad7c04bb85403970afdc1" ON "notifications" ("user_id", "is_read") `);
|
|
32
|
+
await queryRunner.query(`CREATE TYPE "public"."device_tokens_device_type_enum" AS ENUM('ios', 'android', 'web')`);
|
|
33
|
+
await queryRunner.query(`CREATE TABLE "device_tokens" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "fcm_token" character varying NOT NULL, "device_type" "public"."device_tokens_device_type_enum" NOT NULL, "device_name" character varying, "is_active" boolean NOT NULL DEFAULT true, "last_used_at" TIMESTAMP WITH TIME ZONE, CONSTRAINT "PK_84700be257607cfb1f9dc2e52c3" PRIMARY KEY ("id"))`);
|
|
34
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a64b71c267aaf93a3f195f4365" ON "device_tokens" ("user_id", "fcm_token") `);
|
|
35
|
+
await queryRunner.query(`CREATE TYPE "public"."invitations_delivery_channel_enum" AS ENUM('email', 'sms', 'link')`);
|
|
36
|
+
await queryRunner.query(`CREATE TYPE "public"."invitations_invited_by_type_enum" AS ENUM('user', 'admin', 'system', 'service')`);
|
|
37
|
+
await queryRunner.query(`CREATE TYPE "public"."invitations_status_enum" AS ENUM('pending', 'accepted', 'expired', 'revoked', 'cancelled')`);
|
|
38
|
+
await queryRunner.query(`CREATE TABLE "invitations" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "target_email" character varying, "target_phone" character varying, "invited_by_user_id" uuid, "context_type" character varying(64), "context_id" character varying, "accepted_at" TIMESTAMP WITH TIME ZONE, "accepted_by_user_id" uuid, "token_prefix" character varying(12) NOT NULL, "token_hash" character varying NOT NULL, "delivery_channel" "public"."invitations_delivery_channel_enum" NOT NULL DEFAULT 'email', "invited_by_type" "public"."invitations_invited_by_type_enum" NOT NULL DEFAULT 'user', "role_ids" uuid array NOT NULL DEFAULT '{}', "permissions" text array NOT NULL DEFAULT '{}', "metadata" jsonb, "status" "public"."invitations_status_enum" NOT NULL DEFAULT 'pending', "expires_at" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_5dec98cfdfd562e4ad3648bbb07" PRIMARY KEY ("id"))`);
|
|
39
|
+
await queryRunner.query(`CREATE INDEX "IDX_db9ecec7b394a36c1dce10899f" ON "invitations" ("token_prefix") `);
|
|
40
|
+
await queryRunner.query(`CREATE INDEX "IDX_56ddec1301436cff2b5da59a95" ON "invitations" ("target_phone", "status") `);
|
|
41
|
+
await queryRunner.query(`CREATE INDEX "IDX_d75e7dd9c578daad015e5e062d" ON "invitations" ("target_email", "status") `);
|
|
42
|
+
await queryRunner.query(`CREATE INDEX "IDX_50018bf1b8a176727feba0c46f" ON "invitations" ("context_type", "context_id") `);
|
|
43
|
+
await queryRunner.query(`CREATE TABLE "password_reset_tokens" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "user_id" uuid NOT NULL, "used_at" TIMESTAMP WITH TIME ZONE NOT NULL, "ip_address" character varying, CONSTRAINT "PK_d16bebd73e844c48bca50ff8d3d" PRIMARY KEY ("id"))`);
|
|
44
|
+
await queryRunner.query(`CREATE INDEX "IDX_52ac39dd8a28730c63aeb428c9" ON "password_reset_tokens" ("user_id") `);
|
|
45
|
+
await queryRunner.query(`CREATE TABLE "admin_logs" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "actor_id" uuid, "action" character varying NOT NULL, "target_type" character varying, "target_id" uuid, "metadata" jsonb, "ip_address" character varying, CONSTRAINT "PK_1bd116497b175ab12373dcb362b" PRIMARY KEY ("id"))`);
|
|
46
|
+
await queryRunner.query(`CREATE INDEX "IDX_3df363f383075d397bfde7443b" ON "admin_logs" ("actor_id") `);
|
|
47
|
+
await queryRunner.query(`CREATE INDEX "IDX_b4a4d9acc93bed6c9143a54870" ON "admin_logs" ("action") `);
|
|
48
|
+
await queryRunner.query(`CREATE TABLE "role_permissions" ("role_id" uuid NOT NULL, "permission_id" uuid NOT NULL, CONSTRAINT "PK_25d24010f53bb80b78e412c9656" PRIMARY KEY ("role_id", "permission_id"))`);
|
|
49
|
+
await queryRunner.query(`CREATE INDEX "IDX_178199805b901ccd220ab7740e" ON "role_permissions" ("role_id") `);
|
|
50
|
+
await queryRunner.query(`CREATE INDEX "IDX_17022daf3f885f7d35423e9971" ON "role_permissions" ("permission_id") `);
|
|
51
|
+
await queryRunner.query(`CREATE TABLE "user_roles" ("user_id" uuid NOT NULL, "role_id" uuid NOT NULL, CONSTRAINT "PK_23ed6f04fe43066df08379fd034" PRIMARY KEY ("user_id", "role_id"))`);
|
|
52
|
+
await queryRunner.query(`CREATE INDEX "IDX_87b8888186ca9769c960e92687" ON "user_roles" ("user_id") `);
|
|
53
|
+
await queryRunner.query(`CREATE INDEX "IDX_b23c65e50a758245a33ee35fda" ON "user_roles" ("role_id") `);
|
|
54
|
+
await queryRunner.query(`ALTER TABLE "permissions" ADD CONSTRAINT "FK_738f46bb9ac6ea356f1915835d0" FOREIGN KEY ("module_id") REFERENCES "modules"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
55
|
+
await queryRunner.query(`ALTER TABLE "user_profiles" ADD CONSTRAINT "FK_6ca9503d77ae39b4b5a6cc3ba88" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
56
|
+
await queryRunner.query(`ALTER TABLE "refresh_tokens" ADD CONSTRAINT "FK_3ddc983c5f7bcf132fd8732c3f4" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
57
|
+
await queryRunner.query(`ALTER TABLE "notifications" ADD CONSTRAINT "FK_9a8a82462cab47c73d25f49261f" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
58
|
+
await queryRunner.query(`ALTER TABLE "device_tokens" ADD CONSTRAINT "FK_17e1f528b993c6d55def4cf5bea" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
59
|
+
await queryRunner.query(`ALTER TABLE "invitations" ADD CONSTRAINT "FK_e686620e08c4661e70a6b39b94a" FOREIGN KEY ("invited_by_user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
|
|
60
|
+
await queryRunner.query(`ALTER TABLE "invitations" ADD CONSTRAINT "FK_8f29b080d4120512e9f99f2dbb1" FOREIGN KEY ("accepted_by_user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
|
|
61
|
+
await queryRunner.query(`ALTER TABLE "password_reset_tokens" ADD CONSTRAINT "FK_52ac39dd8a28730c63aeb428c9c" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
62
|
+
await queryRunner.query(`ALTER TABLE "admin_logs" ADD CONSTRAINT "FK_3df363f383075d397bfde7443b2" FOREIGN KEY ("actor_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
|
|
63
|
+
await queryRunner.query(`ALTER TABLE "role_permissions" ADD CONSTRAINT "FK_178199805b901ccd220ab7740ec" FOREIGN KEY ("role_id") REFERENCES "roles"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
64
|
+
await queryRunner.query(`ALTER TABLE "role_permissions" ADD CONSTRAINT "FK_17022daf3f885f7d35423e9971e" FOREIGN KEY ("permission_id") REFERENCES "permissions"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
65
|
+
await queryRunner.query(`ALTER TABLE "user_roles" ADD CONSTRAINT "FK_87b8888186ca9769c960e926870" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
66
|
+
await queryRunner.query(`ALTER TABLE "user_roles" ADD CONSTRAINT "FK_b23c65e50a758245a33ee35fda1" FOREIGN KEY ("role_id") REFERENCES "roles"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
67
|
+
}
|
|
68
|
+
async down(queryRunner) {
|
|
69
|
+
await queryRunner.query(`ALTER TABLE "user_roles" DROP CONSTRAINT "FK_b23c65e50a758245a33ee35fda1"`);
|
|
70
|
+
await queryRunner.query(`ALTER TABLE "user_roles" DROP CONSTRAINT "FK_87b8888186ca9769c960e926870"`);
|
|
71
|
+
await queryRunner.query(`ALTER TABLE "role_permissions" DROP CONSTRAINT "FK_17022daf3f885f7d35423e9971e"`);
|
|
72
|
+
await queryRunner.query(`ALTER TABLE "role_permissions" DROP CONSTRAINT "FK_178199805b901ccd220ab7740ec"`);
|
|
73
|
+
await queryRunner.query(`ALTER TABLE "admin_logs" DROP CONSTRAINT "FK_3df363f383075d397bfde7443b2"`);
|
|
74
|
+
await queryRunner.query(`ALTER TABLE "password_reset_tokens" DROP CONSTRAINT "FK_52ac39dd8a28730c63aeb428c9c"`);
|
|
75
|
+
await queryRunner.query(`ALTER TABLE "invitations" DROP CONSTRAINT "FK_8f29b080d4120512e9f99f2dbb1"`);
|
|
76
|
+
await queryRunner.query(`ALTER TABLE "invitations" DROP CONSTRAINT "FK_e686620e08c4661e70a6b39b94a"`);
|
|
77
|
+
await queryRunner.query(`ALTER TABLE "device_tokens" DROP CONSTRAINT "FK_17e1f528b993c6d55def4cf5bea"`);
|
|
78
|
+
await queryRunner.query(`ALTER TABLE "notifications" DROP CONSTRAINT "FK_9a8a82462cab47c73d25f49261f"`);
|
|
79
|
+
await queryRunner.query(`ALTER TABLE "refresh_tokens" DROP CONSTRAINT "FK_3ddc983c5f7bcf132fd8732c3f4"`);
|
|
80
|
+
await queryRunner.query(`ALTER TABLE "user_profiles" DROP CONSTRAINT "FK_6ca9503d77ae39b4b5a6cc3ba88"`);
|
|
81
|
+
await queryRunner.query(`ALTER TABLE "permissions" DROP CONSTRAINT "FK_738f46bb9ac6ea356f1915835d0"`);
|
|
82
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_b23c65e50a758245a33ee35fda"`);
|
|
83
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_87b8888186ca9769c960e92687"`);
|
|
84
|
+
await queryRunner.query(`DROP TABLE "user_roles"`);
|
|
85
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_17022daf3f885f7d35423e9971"`);
|
|
86
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_178199805b901ccd220ab7740e"`);
|
|
87
|
+
await queryRunner.query(`DROP TABLE "role_permissions"`);
|
|
88
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_b4a4d9acc93bed6c9143a54870"`);
|
|
89
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_3df363f383075d397bfde7443b"`);
|
|
90
|
+
await queryRunner.query(`DROP TABLE "admin_logs"`);
|
|
91
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_52ac39dd8a28730c63aeb428c9"`);
|
|
92
|
+
await queryRunner.query(`DROP TABLE "password_reset_tokens"`);
|
|
93
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_50018bf1b8a176727feba0c46f"`);
|
|
94
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_d75e7dd9c578daad015e5e062d"`);
|
|
95
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_56ddec1301436cff2b5da59a95"`);
|
|
96
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_db9ecec7b394a36c1dce10899f"`);
|
|
97
|
+
await queryRunner.query(`DROP TABLE "invitations"`);
|
|
98
|
+
await queryRunner.query(`DROP TYPE "public"."invitations_status_enum"`);
|
|
99
|
+
await queryRunner.query(`DROP TYPE "public"."invitations_invited_by_type_enum"`);
|
|
100
|
+
await queryRunner.query(`DROP TYPE "public"."invitations_delivery_channel_enum"`);
|
|
101
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_a64b71c267aaf93a3f195f4365"`);
|
|
102
|
+
await queryRunner.query(`DROP TABLE "device_tokens"`);
|
|
103
|
+
await queryRunner.query(`DROP TYPE "public"."device_tokens_device_type_enum"`);
|
|
104
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_af08fad7c04bb85403970afdc1"`);
|
|
105
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_310667f935698fcd8cb319113a"`);
|
|
106
|
+
await queryRunner.query(`DROP TABLE "notifications"`);
|
|
107
|
+
await queryRunner.query(`DROP TYPE "public"."notifications_type_enum"`);
|
|
108
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_d5e27da0cd39bc3bb2811fc8ba"`);
|
|
109
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_3ddc983c5f7bcf132fd8732c3f"`);
|
|
110
|
+
await queryRunner.query(`DROP TABLE "refresh_tokens"`);
|
|
111
|
+
await queryRunner.query(`DROP TYPE "public"."refresh_tokens_revoke_reason_enum"`);
|
|
112
|
+
await queryRunner.query(`DROP TABLE "app_settings"`);
|
|
113
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_d551f6c0dca3ad0908c5b05e6f"`);
|
|
114
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_97672ac88f789774dd47f7c8be"`);
|
|
115
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_17d1817f241f10a3dbafb169fd"`);
|
|
116
|
+
await queryRunner.query(`DROP TABLE "users"`);
|
|
117
|
+
await queryRunner.query(`DROP TYPE "public"."users_status_enum"`);
|
|
118
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_7bdaa0714f4c1087a926a2d836"`);
|
|
119
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_6ca9503d77ae39b4b5a6cc3ba8"`);
|
|
120
|
+
await queryRunner.query(`DROP TABLE "user_profiles"`);
|
|
121
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_881f72bac969d9a00a1a29e107"`);
|
|
122
|
+
await queryRunner.query(`DROP TABLE "roles"`);
|
|
123
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_d090ad82a0e97ce764c06c7b31"`);
|
|
124
|
+
await queryRunner.query(`DROP TABLE "permissions"`);
|
|
125
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_503404f7e2e602815906fa62e5"`);
|
|
126
|
+
await queryRunner.query(`DROP TABLE "modules"`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.FullSchema1780722826101 = FullSchema1780722826101;
|
|
130
|
+
//# sourceMappingURL=1780722826101-full-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1780722826101-full-schema.js","sourceRoot":"","sources":["../../../src/database/migrations/1780722826101-full-schema.ts"],"names":[],"mappings":";;;AAEA,MAAa,uBAAuB;IAApC;QACC,SAAI,GAAG,yBAAyB,CAAC;IAyQlC,CAAC;IAvQO,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CACtB,sbAAsb,CACtb,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,6EAA6E,CAC7E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,sdAAsd,CACtd,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,iFAAiF,CACjF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,obAAob,CACpb,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,2EAA2E,CAC3E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,qrCAAqrC,CACrrC,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,sFAAsF,CACtF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,uFAAuF,CACvF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,0GAA0G,CAC1G,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,yjDAAyjD,CACzjD,CAAC;QACF,M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AAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACvD,MAAM,WAAW,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAClF,MAAM,WAAW,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACrD,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,WAAW,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAClE,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACtD,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QACpD,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACjD,CAAC;CACD;AA1QD,0DA0QC"}
|
|
@@ -40,6 +40,8 @@ class FullSchema1781419023501 {
|
|
|
40
40
|
await queryRunner.query(`CREATE INDEX "IDX_56ddec1301436cff2b5da59a95" ON "invitations" ("target_phone", "status") `);
|
|
41
41
|
await queryRunner.query(`CREATE INDEX "IDX_d75e7dd9c578daad015e5e062d" ON "invitations" ("target_email", "status") `);
|
|
42
42
|
await queryRunner.query(`CREATE INDEX "IDX_50018bf1b8a176727feba0c46f" ON "invitations" ("context_type", "context_id") `);
|
|
43
|
+
await queryRunner.query(`CREATE TABLE "uploaded_files" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "category" character varying(64) NOT NULL, "object_key" character varying(512) NOT NULL, "original_name" character varying(255) NOT NULL, "mime_type" character varying(128) NOT NULL, "extension" character varying(16) NOT NULL, "size_bytes" bigint NOT NULL, "public_url" character varying(1024), "etag" character varying(128), CONSTRAINT "PK_e2d47e01bd5be386bf0067b2ed8" PRIMARY KEY ("id"))`);
|
|
44
|
+
await queryRunner.query(`CREATE INDEX "IDX_8e04276a325c19d973f7ae139c" ON "uploaded_files" ("user_id", "category") `);
|
|
43
45
|
await queryRunner.query(`CREATE TABLE "user_pins" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "type" character varying(50) NOT NULL, "pin_hash" text NOT NULL, "failed_attempts" integer NOT NULL DEFAULT '0', "locked_until" TIMESTAMP WITH TIME ZONE, "pin_updated_at" TIMESTAMP WITH TIME ZONE, "last_verified_at" TIMESTAMP WITH TIME ZONE, CONSTRAINT "UQ_428e19fe9178c31697e898a6b6a" UNIQUE ("user_id", "type"), CONSTRAINT "PK_04d8629bc798645e0cedffd9cc5" PRIMARY KEY ("id"))`);
|
|
44
46
|
await queryRunner.query(`CREATE INDEX "IDX_7183f920c4866d4aacdd2167c3" ON "user_pins" ("user_id") `);
|
|
45
47
|
await queryRunner.query(`CREATE INDEX "IDX_8ff63e24895154e1c5cb172729" ON "user_pins" ("type") `);
|
|
@@ -48,8 +50,6 @@ class FullSchema1781419023501 {
|
|
|
48
50
|
await queryRunner.query(`CREATE TABLE "admin_logs" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "actor_id" uuid, "action" character varying NOT NULL, "target_type" character varying, "target_id" uuid, "metadata" jsonb, "ip_address" character varying, CONSTRAINT "PK_1bd116497b175ab12373dcb362b" PRIMARY KEY ("id"))`);
|
|
49
51
|
await queryRunner.query(`CREATE INDEX "IDX_3df363f383075d397bfde7443b" ON "admin_logs" ("actor_id") `);
|
|
50
52
|
await queryRunner.query(`CREATE INDEX "IDX_b4a4d9acc93bed6c9143a54870" ON "admin_logs" ("action") `);
|
|
51
|
-
await queryRunner.query(`CREATE TABLE "uploaded_files" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL DEFAULT '1', "user_id" uuid NOT NULL, "category" character varying(64) NOT NULL, "object_key" character varying(512) NOT NULL, "original_name" character varying(255) NOT NULL, "mime_type" character varying(128) NOT NULL, "extension" character varying(16) NOT NULL, "size_bytes" bigint NOT NULL, "public_url" character varying(1024), "etag" character varying(128), CONSTRAINT "PK_uploaded_files" PRIMARY KEY ("id"))`);
|
|
52
|
-
await queryRunner.query(`CREATE INDEX "IDX_uploaded_files_user_category" ON "uploaded_files" ("user_id", "category")`);
|
|
53
53
|
await queryRunner.query(`CREATE TABLE "role_permissions" ("role_id" uuid NOT NULL, "permission_id" uuid NOT NULL, CONSTRAINT "PK_25d24010f53bb80b78e412c9656" PRIMARY KEY ("role_id", "permission_id"))`);
|
|
54
54
|
await queryRunner.query(`CREATE INDEX "IDX_178199805b901ccd220ab7740e" ON "role_permissions" ("role_id") `);
|
|
55
55
|
await queryRunner.query(`CREATE INDEX "IDX_17022daf3f885f7d35423e9971" ON "role_permissions" ("permission_id") `);
|
|
@@ -63,10 +63,10 @@ class FullSchema1781419023501 {
|
|
|
63
63
|
await queryRunner.query(`ALTER TABLE "device_tokens" ADD CONSTRAINT "FK_17e1f528b993c6d55def4cf5bea" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
64
64
|
await queryRunner.query(`ALTER TABLE "invitations" ADD CONSTRAINT "FK_e686620e08c4661e70a6b39b94a" FOREIGN KEY ("invited_by_user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
|
|
65
65
|
await queryRunner.query(`ALTER TABLE "invitations" ADD CONSTRAINT "FK_8f29b080d4120512e9f99f2dbb1" FOREIGN KEY ("accepted_by_user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
|
|
66
|
+
await queryRunner.query(`ALTER TABLE "uploaded_files" ADD CONSTRAINT "FK_dbd75c6a10be3314708a397da86" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
66
67
|
await queryRunner.query(`ALTER TABLE "user_pins" ADD CONSTRAINT "FK_7183f920c4866d4aacdd2167c3e" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
67
68
|
await queryRunner.query(`ALTER TABLE "password_reset_tokens" ADD CONSTRAINT "FK_52ac39dd8a28730c63aeb428c9c" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
68
69
|
await queryRunner.query(`ALTER TABLE "admin_logs" ADD CONSTRAINT "FK_3df363f383075d397bfde7443b2" FOREIGN KEY ("actor_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
|
|
69
|
-
await queryRunner.query(`ALTER TABLE "uploaded_files" ADD CONSTRAINT "FK_uploaded_files_user" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
70
70
|
await queryRunner.query(`ALTER TABLE "role_permissions" ADD CONSTRAINT "FK_178199805b901ccd220ab7740ec" FOREIGN KEY ("role_id") REFERENCES "roles"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
71
71
|
await queryRunner.query(`ALTER TABLE "role_permissions" ADD CONSTRAINT "FK_17022daf3f885f7d35423e9971e" FOREIGN KEY ("permission_id") REFERENCES "permissions"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
72
72
|
await queryRunner.query(`ALTER TABLE "user_roles" ADD CONSTRAINT "FK_87b8888186ca9769c960e926870" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
@@ -78,9 +78,9 @@ class FullSchema1781419023501 {
|
|
|
78
78
|
await queryRunner.query(`ALTER TABLE "role_permissions" DROP CONSTRAINT "FK_17022daf3f885f7d35423e9971e"`);
|
|
79
79
|
await queryRunner.query(`ALTER TABLE "role_permissions" DROP CONSTRAINT "FK_178199805b901ccd220ab7740ec"`);
|
|
80
80
|
await queryRunner.query(`ALTER TABLE "admin_logs" DROP CONSTRAINT "FK_3df363f383075d397bfde7443b2"`);
|
|
81
|
-
await queryRunner.query(`ALTER TABLE "uploaded_files" DROP CONSTRAINT "FK_uploaded_files_user"`);
|
|
82
81
|
await queryRunner.query(`ALTER TABLE "password_reset_tokens" DROP CONSTRAINT "FK_52ac39dd8a28730c63aeb428c9c"`);
|
|
83
82
|
await queryRunner.query(`ALTER TABLE "user_pins" DROP CONSTRAINT "FK_7183f920c4866d4aacdd2167c3e"`);
|
|
83
|
+
await queryRunner.query(`ALTER TABLE "uploaded_files" DROP CONSTRAINT "FK_dbd75c6a10be3314708a397da86"`);
|
|
84
84
|
await queryRunner.query(`ALTER TABLE "invitations" DROP CONSTRAINT "FK_8f29b080d4120512e9f99f2dbb1"`);
|
|
85
85
|
await queryRunner.query(`ALTER TABLE "invitations" DROP CONSTRAINT "FK_e686620e08c4661e70a6b39b94a"`);
|
|
86
86
|
await queryRunner.query(`ALTER TABLE "device_tokens" DROP CONSTRAINT "FK_17e1f528b993c6d55def4cf5bea"`);
|
|
@@ -97,13 +97,13 @@ class FullSchema1781419023501 {
|
|
|
97
97
|
await queryRunner.query(`DROP INDEX "public"."IDX_b4a4d9acc93bed6c9143a54870"`);
|
|
98
98
|
await queryRunner.query(`DROP INDEX "public"."IDX_3df363f383075d397bfde7443b"`);
|
|
99
99
|
await queryRunner.query(`DROP TABLE "admin_logs"`);
|
|
100
|
-
await queryRunner.query(`DROP INDEX "public"."IDX_uploaded_files_user_category"`);
|
|
101
|
-
await queryRunner.query(`DROP TABLE "uploaded_files"`);
|
|
102
100
|
await queryRunner.query(`DROP INDEX "public"."IDX_52ac39dd8a28730c63aeb428c9"`);
|
|
103
101
|
await queryRunner.query(`DROP TABLE "password_reset_tokens"`);
|
|
104
102
|
await queryRunner.query(`DROP INDEX "public"."IDX_8ff63e24895154e1c5cb172729"`);
|
|
105
103
|
await queryRunner.query(`DROP INDEX "public"."IDX_7183f920c4866d4aacdd2167c3"`);
|
|
106
104
|
await queryRunner.query(`DROP TABLE "user_pins"`);
|
|
105
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_8e04276a325c19d973f7ae139c"`);
|
|
106
|
+
await queryRunner.query(`DROP TABLE "uploaded_files"`);
|
|
107
107
|
await queryRunner.query(`DROP INDEX "public"."IDX_50018bf1b8a176727feba0c46f"`);
|
|
108
108
|
await queryRunner.query(`DROP INDEX "public"."IDX_d75e7dd9c578daad015e5e062d"`);
|
|
109
109
|
await queryRunner.query(`DROP INDEX "public"."IDX_56ddec1301436cff2b5da59a95"`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1781419023501-full-schema.js","sourceRoot":"","sources":["../../../src/database/migrations/1781419023501-full-schema.ts"],"names":[],"mappings":";;;AAEA,MAAa,uBAAuB;IAApC;QACC,SAAI,GAAG,yBAAyB,CAAC;IAySlC,CAAC;IAvSO,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CACtB,sbAAsb,CACtb,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,6EAA6E,CAC7E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,sdAAsd,CACtd,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,iFAAiF,CACjF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,obAAob,CACpb,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,2EAA2E,CAC3E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,qrCAAqrC,CACrrC,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,sFAAsF,CACtF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,uFAAuF,CACvF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,0GAA0G,CAC1G,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,yjDAAyjD,CACzjD,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,mFAAmF,CACnF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,4EAA4E,CAC5E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,mFAAmF,CACnF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,0lBAA0lB,CAC1lB,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,kHAAkH,CAClH,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,4sBAA4sB,CAC5sB,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,gFAAgF,CAChF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,kFAAkF,CAClF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,yJAAyJ,CACzJ,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,0lBAA0lB,CAC1lB,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,6FAA6F,CAC7F,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,0FAA0F,CAC1F,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,wFAAwF,CACxF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,ilBAAilB,CACjlB,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,mGAAmG,CACnG,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,0FAA0F,CAC1F,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,uGAAuG,CACvG,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,kHAAkH,CAClH,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,gjCAAgjC,CAChjC,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,kFAAkF,CAClF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,4FAA4F,CAC5F,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,4FAA4F,CAC5F,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,gGAAgG,CAChG,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,
|
|
1
|
+
{"version":3,"file":"1781419023501-full-schema.js","sourceRoot":"","sources":["../../../src/database/migrations/1781419023501-full-schema.ts"],"names":[],"mappings":";;;AAEA,MAAa,uBAAuB;IAApC;QACC,SAAI,GAAG,yBAAyB,CAAC;IAySlC,CAAC;IAvSO,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CACtB,sbAAsb,CACtb,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACtB,6E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"","sources":["../../../src/database/seeds/settings.seed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAc,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,oDAAoD,CAAC;AAKhF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,CAAC,CAAC;AAErF,qBAAa,YAAY;IAIZ,OAAO,CAAC,UAAU;IAH9B,OAAO,CAAC,IAAI,CAAyB;IACrC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA4B;gBAE3C,UAAU,EAAE,UAAU;IAIpC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB1B,OAAO,CAAC,aAAa;
|
|
1
|
+
{"version":3,"file":"settings.seed.d.ts","sourceRoot":"","sources":["../../../src/database/seeds/settings.seed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAc,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,oDAAoD,CAAC;AAKhF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,CAAC,CAAC;AAErF,qBAAa,YAAY;IAIZ,OAAO,CAAC,UAAU;IAH9B,OAAO,CAAC,IAAI,CAAyB;IACrC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA4B;gBAE3C,UAAU,EAAE,UAAU;IAIpC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB1B,OAAO,CAAC,aAAa;IAgiBrB,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,0BAA0B;CA6ClC"}
|