@ooneex/typeorm 0.0.1 → 0.3.0
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/dist/shared/chunk-1ez1q8rj.js +5 -0
- package/dist/shared/chunk-1ez1q8rj.js.map +10 -0
- package/dist/shared/chunk-23739ja5.js +5 -0
- package/dist/shared/{chunk-pwhygf44.js.map → chunk-23739ja5.js.map} +2 -2
- package/dist/shared/chunk-3s989zjv.js +5 -0
- package/dist/shared/{chunk-eh420jqn.js.map → chunk-3s989zjv.js.map} +2 -2
- package/dist/shared/chunk-4ysz6b7v.js +5 -0
- package/dist/shared/chunk-4ysz6b7v.js.map +10 -0
- package/dist/shared/chunk-635xd7h1.js +5 -0
- package/dist/shared/{chunk-wmftwzcs.js.map → chunk-635xd7h1.js.map} +2 -2
- package/dist/shared/chunk-63wp98dt.js +101 -0
- package/dist/shared/chunk-63wp98dt.js.map +11 -0
- package/dist/shared/chunk-6gzanxfz.js +5 -0
- package/dist/shared/chunk-6gzanxfz.js.map +18 -0
- package/dist/shared/chunk-81xh5hbk.js +5 -0
- package/dist/shared/chunk-81xh5hbk.js.map +21 -0
- package/dist/shared/chunk-8q6vs955.js +5 -0
- package/dist/shared/chunk-8q6vs955.js.map +10 -0
- package/dist/shared/chunk-bdyby4d8.js +5 -0
- package/dist/shared/chunk-bdyby4d8.js.map +10 -0
- package/dist/shared/chunk-fjtw26pp.js +5 -0
- package/dist/shared/{chunk-j7nprmyh.js.map → chunk-fjtw26pp.js.map} +2 -2
- package/dist/shared/chunk-gcch857j.js +5 -0
- package/dist/shared/chunk-gcch857j.js.map +11 -0
- package/dist/shared/chunk-h5mdrgqp.js +5 -0
- package/dist/shared/chunk-h5mdrgqp.js.map +21 -0
- package/dist/shared/chunk-mwb9mvew.js +42 -0
- package/dist/shared/chunk-mwb9mvew.js.map +10 -0
- package/dist/shared/chunk-n5dqa3qy.js +36 -0
- package/dist/shared/chunk-n5dqa3qy.js.map +10 -0
- package/dist/shared/chunk-qqvx08b4.js +5 -0
- package/dist/shared/{chunk-2e7zbxcq.js.map → chunk-qqvx08b4.js.map} +2 -2
- package/dist/shared/chunk-r7q1mkar.js +82 -0
- package/dist/shared/chunk-r7q1mkar.js.map +10 -0
- package/dist/shared/chunk-s1yxjjz5.js +5 -0
- package/dist/shared/chunk-s1yxjjz5.js.map +21 -0
- package/dist/shared/chunk-sm3brprk.js +51 -0
- package/dist/shared/chunk-sm3brprk.js.map +10 -0
- package/dist/shared/chunk-wp8mt34q.js +5 -0
- package/dist/shared/chunk-wp8mt34q.js.map +12 -0
- package/dist/shared/chunk-x9h6vngs.js +5 -0
- package/dist/shared/chunk-x9h6vngs.js.map +9 -0
- package/dist/shared/chunk-xyq6sfz0.js +5 -0
- package/dist/shared/{chunk-zmzz7hqq.js.map → chunk-xyq6sfz0.js.map} +2 -2
- package/dist/shared/chunk-yq9g4gac.js +5 -0
- package/dist/shared/{chunk-wawk30n1.js.map → chunk-yq9g4gac.js.map} +9 -4
- package/dist/src/entities/book/index.d.ts +80 -3
- package/dist/src/entities/book/index.js +2 -2
- package/dist/src/entities/book/index.js.map +1 -1
- package/dist/src/entities/common/index.d.ts +21 -28
- package/dist/src/entities/common/index.js +2 -2
- package/dist/src/entities/common/index.js.map +1 -1
- package/dist/src/entities/country/index.d.ts +21 -0
- package/dist/src/entities/country/index.js +4 -0
- package/dist/src/entities/country/index.js.map +9 -0
- package/dist/src/entities/currency/index.d.ts +23 -0
- package/dist/src/entities/currency/index.js +4 -0
- package/dist/src/entities/currency/index.js.map +9 -0
- package/dist/src/entities/folder/index.d.ts +104 -0
- package/dist/src/entities/folder/index.js +4 -0
- package/dist/src/entities/folder/index.js.map +19 -0
- package/dist/src/entities/gamification/flashcard/index.js +2 -2
- package/dist/src/entities/gamification/flashcard/index.js.map +1 -1
- package/dist/src/entities/gamification/index.js +2 -2
- package/dist/src/entities/gamification/index.js.map +1 -1
- package/dist/src/entities/gamification/mcq/index.d.ts +76 -7
- package/dist/src/entities/gamification/mcq/index.js +2 -2
- package/dist/src/entities/gamification/mcq/index.js.map +1 -1
- package/dist/src/entities/image/index.d.ts +83 -6
- package/dist/src/entities/image/index.js +2 -2
- package/dist/src/entities/image/index.js.map +1 -1
- package/dist/src/entities/medecine/index.d.ts +36 -0
- package/dist/src/entities/medecine/index.js +4 -0
- package/dist/src/entities/medecine/index.js.map +9 -0
- package/dist/src/entities/payment/index.js +2 -2
- package/dist/src/entities/payment/index.js.map +1 -1
- package/dist/src/entities/user/index.d.ts +48 -7
- package/dist/src/entities/user/index.js +2 -2
- package/dist/src/entities/user/index.js.map +1 -1
- package/dist/src/entities/video/index.d.ts +88 -10
- package/dist/src/entities/video/index.js +2 -2
- package/dist/src/entities/video/index.js.map +1 -1
- package/dist/src/migrations/book/index.d.ts +97 -0
- package/dist/src/migrations/book/index.js +516 -0
- package/dist/src/migrations/book/index.js.map +21 -0
- package/dist/src/migrations/common/index.d.ts +41 -0
- package/dist/src/migrations/common/index.js +57 -0
- package/dist/src/migrations/common/index.js.map +10 -0
- package/dist/src/migrations/country/index.d.ts +9 -0
- package/dist/src/migrations/country/index.js +40 -0
- package/dist/src/migrations/country/index.js.map +10 -0
- package/dist/src/migrations/currency/index.d.ts +9 -0
- package/dist/src/migrations/currency/index.js +44 -0
- package/dist/src/migrations/currency/index.js.map +10 -0
- package/dist/src/migrations/folder/index.d.ts +81 -0
- package/dist/src/migrations/folder/index.js +387 -0
- package/dist/src/migrations/folder/index.js.map +19 -0
- package/dist/src/migrations/gamification/flashcard/index.d.ts +57 -0
- package/dist/src/migrations/gamification/flashcard/index.js +420 -0
- package/dist/src/migrations/gamification/flashcard/index.js.map +16 -0
- package/dist/src/migrations/gamification/index.d.ts +9 -0
- package/dist/src/migrations/gamification/index.js +4 -0
- package/dist/src/migrations/gamification/index.js.map +9 -0
- package/dist/src/migrations/gamification/mcq/index.d.ts +97 -0
- package/dist/src/migrations/gamification/mcq/index.js +526 -0
- package/dist/src/migrations/gamification/mcq/index.js.map +21 -0
- package/dist/src/migrations/image/index.d.ts +81 -0
- package/dist/src/migrations/image/index.js +328 -0
- package/dist/src/migrations/image/index.js.map +18 -0
- package/dist/src/migrations/medecine/index.d.ts +25 -0
- package/dist/src/migrations/medecine/index.js +119 -0
- package/dist/src/migrations/medecine/index.js.map +12 -0
- package/dist/src/migrations/payment/index.d.ts +49 -0
- package/dist/src/migrations/payment/index.js +352 -0
- package/dist/src/migrations/payment/index.js.map +15 -0
- package/dist/src/migrations/user/index.d.ts +81 -0
- package/dist/src/migrations/user/index.js +309 -0
- package/dist/src/migrations/user/index.js.map +19 -0
- package/dist/src/migrations/video/index.d.ts +97 -0
- package/dist/src/migrations/video/index.js +289 -0
- package/dist/src/migrations/video/index.js.map +21 -0
- package/dist/src/repositories/book/index.d.ts +310 -35
- package/dist/src/repositories/book/index.js +2 -2
- package/dist/src/repositories/book/index.js.map +15 -6
- package/dist/src/repositories/common/index.d.ts +65 -94
- package/dist/src/repositories/common/index.js +2 -2
- package/dist/src/repositories/common/index.js.map +8 -9
- package/dist/src/repositories/country/index.d.ts +42 -0
- package/dist/src/repositories/country/index.js +4 -0
- package/dist/src/repositories/country/index.js.map +10 -0
- package/dist/src/repositories/currency/index.d.ts +44 -0
- package/dist/src/repositories/currency/index.js +4 -0
- package/dist/src/repositories/currency/index.js.map +10 -0
- package/dist/src/repositories/gamification/flashcard/index.d.ts +14 -14
- package/dist/src/repositories/gamification/flashcard/index.js +2 -2
- package/dist/src/repositories/gamification/flashcard/index.js.map +9 -9
- package/dist/src/repositories/gamification/index.d.ts +328 -83
- package/dist/src/repositories/gamification/index.js +2 -2
- package/dist/src/repositories/gamification/index.js.map +3 -3
- package/dist/src/repositories/gamification/mcq/index.d.ts +299 -54
- package/dist/src/repositories/gamification/mcq/index.js +2 -2
- package/dist/src/repositories/gamification/mcq/index.js.map +15 -7
- package/dist/src/repositories/image/index.d.ts +295 -20
- package/dist/src/repositories/image/index.js +2 -2
- package/dist/src/repositories/image/index.js.map +13 -4
- package/dist/src/repositories/medecine/index.d.ts +99 -0
- package/dist/src/repositories/medecine/index.js +4 -0
- package/dist/src/repositories/medecine/index.js.map +12 -0
- package/dist/src/repositories/payment/index.d.ts +12 -12
- package/dist/src/repositories/payment/index.js +2 -2
- package/dist/src/repositories/payment/index.js.map +8 -8
- package/dist/src/repositories/user/index.d.ts +210 -59
- package/dist/src/repositories/user/index.js +2 -2
- package/dist/src/repositories/user/index.js.map +13 -8
- package/dist/src/repositories/video/index.d.ts +330 -54
- package/dist/src/repositories/video/index.js +2 -2
- package/dist/src/repositories/video/index.js.map +15 -6
- package/package.json +188 -58
- package/dist/ooneex-typeorm-0.0.1.tgz +0 -0
- package/dist/shared/chunk-2e7zbxcq.js +0 -5
- package/dist/shared/chunk-764bzjhz.js +0 -5
- package/dist/shared/chunk-764bzjhz.js.map +0 -12
- package/dist/shared/chunk-eh420jqn.js +0 -5
- package/dist/shared/chunk-gjsgnzaq.js +0 -5
- package/dist/shared/chunk-gjsgnzaq.js.map +0 -10
- package/dist/shared/chunk-hw4vdg6q.js +0 -5
- package/dist/shared/chunk-hw4vdg6q.js.map +0 -10
- package/dist/shared/chunk-j7nprmyh.js +0 -5
- package/dist/shared/chunk-kgxsdeye.js +0 -5
- package/dist/shared/chunk-kgxsdeye.js.map +0 -13
- package/dist/shared/chunk-ntrrrvwt.js +0 -5
- package/dist/shared/chunk-ntrrrvwt.js.map +0 -12
- package/dist/shared/chunk-pwhygf44.js +0 -5
- package/dist/shared/chunk-sd6mmec6.js +0 -5
- package/dist/shared/chunk-sd6mmec6.js.map +0 -12
- package/dist/shared/chunk-wawk30n1.js +0 -5
- package/dist/shared/chunk-wmftwzcs.js +0 -5
- package/dist/shared/chunk-zmzz7hqq.js +0 -5
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{a as u}from"../../../shared/chunk-r7q1mkar.js";import"../../../shared/chunk-mwb9mvew.js";import"../../../shared/chunk-63wp98dt.js";import{_a as i}from"../../../shared/chunk-x9h6vngs.js";import{decorator as N}from"@ooneex/migrations";class s{async up(e){await e`
|
|
3
|
+
CREATE TABLE IF NOT EXISTS users (
|
|
4
|
+
id VARCHAR(25) PRIMARY KEY,
|
|
5
|
+
email VARCHAR(255) NOT NULL UNIQUE,
|
|
6
|
+
roles TEXT NOT NULL,
|
|
7
|
+
name VARCHAR(255),
|
|
8
|
+
last_name VARCHAR(255),
|
|
9
|
+
first_name VARCHAR(255),
|
|
10
|
+
username VARCHAR(100) UNIQUE,
|
|
11
|
+
avatar_id VARCHAR(25),
|
|
12
|
+
bio TEXT,
|
|
13
|
+
phone VARCHAR(20),
|
|
14
|
+
birth_date DATE,
|
|
15
|
+
timezone VARCHAR(50),
|
|
16
|
+
is_email_verified BOOLEAN DEFAULT false,
|
|
17
|
+
is_phone_verified BOOLEAN DEFAULT false,
|
|
18
|
+
last_active_at TIMESTAMPTZ,
|
|
19
|
+
email_verified_at TIMESTAMPTZ,
|
|
20
|
+
phone_verified_at TIMESTAMPTZ,
|
|
21
|
+
last_login_at TIMESTAMPTZ,
|
|
22
|
+
password_changed_at TIMESTAMPTZ,
|
|
23
|
+
two_factor_enabled BOOLEAN DEFAULT false,
|
|
24
|
+
two_factor_secret VARCHAR(255),
|
|
25
|
+
recovery_tokens TEXT,
|
|
26
|
+
is_locked BOOLEAN DEFAULT false,
|
|
27
|
+
locked_at TIMESTAMPTZ,
|
|
28
|
+
is_blocked BOOLEAN DEFAULT false,
|
|
29
|
+
blocked_at TIMESTAMPTZ,
|
|
30
|
+
block_reason TEXT,
|
|
31
|
+
is_public BOOLEAN DEFAULT true,
|
|
32
|
+
language VARCHAR(10),
|
|
33
|
+
created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
34
|
+
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
35
|
+
deleted_at TIMESTAMPTZ,
|
|
36
|
+
CONSTRAINT fk_users_avatar FOREIGN KEY (avatar_id) REFERENCES images(id) ON DELETE SET NULL
|
|
37
|
+
)
|
|
38
|
+
`,await e`
|
|
39
|
+
CREATE INDEX IF NOT EXISTS idx_users_email ON users(email)
|
|
40
|
+
`,await e`
|
|
41
|
+
CREATE INDEX IF NOT EXISTS idx_users_username ON users(username)
|
|
42
|
+
`,await e`
|
|
43
|
+
CREATE INDEX IF NOT EXISTS idx_users_phone ON users(phone)
|
|
44
|
+
`,await e`
|
|
45
|
+
CREATE INDEX IF NOT EXISTS idx_users_is_email_verified ON users(is_email_verified)
|
|
46
|
+
`,await e`
|
|
47
|
+
CREATE INDEX IF NOT EXISTS idx_users_is_phone_verified ON users(is_phone_verified)
|
|
48
|
+
`,await e`
|
|
49
|
+
CREATE INDEX IF NOT EXISTS idx_users_last_active_at ON users(last_active_at DESC)
|
|
50
|
+
`,await e`
|
|
51
|
+
CREATE INDEX IF NOT EXISTS idx_users_last_login_at ON users(last_login_at DESC)
|
|
52
|
+
`,await e`
|
|
53
|
+
CREATE INDEX IF NOT EXISTS idx_users_two_factor_enabled ON users(two_factor_enabled)
|
|
54
|
+
`,await e`
|
|
55
|
+
CREATE INDEX IF NOT EXISTS idx_users_language ON users(language)
|
|
56
|
+
`,await e`
|
|
57
|
+
CREATE INDEX IF NOT EXISTS idx_users_deleted_at ON users(deleted_at)
|
|
58
|
+
`,await e`
|
|
59
|
+
CREATE INDEX IF NOT EXISTS idx_users_is_public ON users(is_public) WHERE deleted_at IS NULL
|
|
60
|
+
`,await e`
|
|
61
|
+
CREATE INDEX IF NOT EXISTS idx_users_created_at ON users(created_at DESC)
|
|
62
|
+
`,await e`
|
|
63
|
+
CREATE INDEX IF NOT EXISTS idx_users_updated_at ON users(updated_at DESC)
|
|
64
|
+
`,await e`
|
|
65
|
+
CREATE INDEX IF NOT EXISTS idx_users_active ON users(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
|
|
66
|
+
`}async down(e){await e`DROP TABLE IF EXISTS users CASCADE`}getVersion(){return"20251225182641298"}getDependencies(){return[u]}}s=i([N.migration()],s);import{decorator as I}from"@ooneex/migrations";class a{async up(e){await e`
|
|
67
|
+
CREATE TYPE account_type AS ENUM ('oauth', 'email', 'credentials', 'webauthn')
|
|
68
|
+
`,await e`
|
|
69
|
+
CREATE TABLE IF NOT EXISTS accounts (
|
|
70
|
+
id VARCHAR(25) PRIMARY KEY,
|
|
71
|
+
provider VARCHAR(100),
|
|
72
|
+
provider_account_id VARCHAR(255),
|
|
73
|
+
type account_type NOT NULL,
|
|
74
|
+
password VARCHAR(255),
|
|
75
|
+
access_token TEXT,
|
|
76
|
+
access_token_expires_at TIMESTAMPTZ,
|
|
77
|
+
refresh_token TEXT,
|
|
78
|
+
refresh_token_expires_at TIMESTAMPTZ,
|
|
79
|
+
expires_at TIMESTAMPTZ,
|
|
80
|
+
token_type VARCHAR(50),
|
|
81
|
+
scope TEXT,
|
|
82
|
+
id_token TEXT,
|
|
83
|
+
session_state VARCHAR(255),
|
|
84
|
+
email VARCHAR(255),
|
|
85
|
+
email_verified BOOLEAN DEFAULT false,
|
|
86
|
+
name VARCHAR(255),
|
|
87
|
+
picture VARCHAR(500),
|
|
88
|
+
profile JSONB,
|
|
89
|
+
user_id VARCHAR(25),
|
|
90
|
+
is_locked BOOLEAN DEFAULT false,
|
|
91
|
+
locked_at TIMESTAMPTZ,
|
|
92
|
+
is_blocked BOOLEAN DEFAULT false,
|
|
93
|
+
blocked_at TIMESTAMPTZ,
|
|
94
|
+
block_reason TEXT,
|
|
95
|
+
is_public BOOLEAN DEFAULT true,
|
|
96
|
+
language VARCHAR(10),
|
|
97
|
+
created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
98
|
+
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
99
|
+
deleted_at TIMESTAMPTZ,
|
|
100
|
+
CONSTRAINT fk_accounts_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
|
101
|
+
)
|
|
102
|
+
`,await e`
|
|
103
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_user_id ON accounts(user_id)
|
|
104
|
+
`,await e`
|
|
105
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_provider ON accounts(provider)
|
|
106
|
+
`,await e`
|
|
107
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_provider_account_id ON accounts(provider_account_id)
|
|
108
|
+
`,await e`
|
|
109
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_type ON accounts(type)
|
|
110
|
+
`,await e`
|
|
111
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_email ON accounts(email)
|
|
112
|
+
`,await e`
|
|
113
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_expires_at ON accounts(expires_at)
|
|
114
|
+
`,await e`
|
|
115
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_language ON accounts(language)
|
|
116
|
+
`,await e`
|
|
117
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_deleted_at ON accounts(deleted_at)
|
|
118
|
+
`,await e`
|
|
119
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_is_public ON accounts(is_public) WHERE deleted_at IS NULL
|
|
120
|
+
`,await e`
|
|
121
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_created_at ON accounts(created_at DESC)
|
|
122
|
+
`,await e`
|
|
123
|
+
CREATE INDEX IF NOT EXISTS idx_accounts_active ON accounts(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
|
|
124
|
+
`,await e`
|
|
125
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_accounts_provider_unique ON accounts(provider, provider_account_id) WHERE deleted_at IS NULL
|
|
126
|
+
`}async down(e){await e`DROP TABLE IF EXISTS accounts CASCADE`,await e`DROP TYPE IF EXISTS account_type CASCADE`}getVersion(){return"20251225182641300"}getDependencies(){return[s]}}a=i([I.migration()],a);import{decorator as c}from"@ooneex/migrations";class r{async up(e){await e`
|
|
127
|
+
CREATE TABLE IF NOT EXISTS users_sessions (
|
|
128
|
+
id VARCHAR(25) PRIMARY KEY,
|
|
129
|
+
user_id VARCHAR(25) NOT NULL,
|
|
130
|
+
token VARCHAR(255) NOT NULL UNIQUE,
|
|
131
|
+
refresh_token VARCHAR(255),
|
|
132
|
+
expires_at TIMESTAMP NOT NULL,
|
|
133
|
+
ip_address VARCHAR(45),
|
|
134
|
+
user_agent TEXT,
|
|
135
|
+
device VARCHAR(255),
|
|
136
|
+
browser VARCHAR(255),
|
|
137
|
+
os VARCHAR(255),
|
|
138
|
+
is_revoked BOOLEAN DEFAULT false,
|
|
139
|
+
revoked_at TIMESTAMP,
|
|
140
|
+
last_activity_at TIMESTAMP,
|
|
141
|
+
is_locked BOOLEAN DEFAULT false,
|
|
142
|
+
locked_at TIMESTAMP,
|
|
143
|
+
is_blocked BOOLEAN DEFAULT false,
|
|
144
|
+
blocked_at TIMESTAMP,
|
|
145
|
+
block_reason TEXT,
|
|
146
|
+
is_public BOOLEAN DEFAULT true,
|
|
147
|
+
language VARCHAR(10) DEFAULT 'en',
|
|
148
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
149
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
150
|
+
deleted_at TIMESTAMP,
|
|
151
|
+
CONSTRAINT fk_users_sessions_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
|
152
|
+
)
|
|
153
|
+
`,await e`CREATE INDEX IF NOT EXISTS idx_users_sessions_user_id ON users_sessions(user_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_sessions_token ON users_sessions(token)`,await e`CREATE INDEX IF NOT EXISTS idx_users_sessions_refresh_token ON users_sessions(refresh_token)`,await e`CREATE INDEX IF NOT EXISTS idx_users_sessions_expires_at ON users_sessions(expires_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_sessions_is_revoked ON users_sessions(is_revoked)`,await e`CREATE INDEX IF NOT EXISTS idx_users_sessions_active ON users_sessions(user_id, is_revoked, expires_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_sessions_created_at ON users_sessions(created_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_sessions_deleted_at ON users_sessions(deleted_at)`}async down(e){await e`DROP TABLE IF EXISTS users_sessions CASCADE`}getVersion(){return"20251225182641303"}getDependencies(){return[s]}}r=i([c.migration()],r);import{decorator as n}from"@ooneex/migrations";class E{async up(e){await e`CREATE TYPE verification_type AS ENUM ('email', 'phone', 'two_factor')`,await e`
|
|
154
|
+
CREATE TABLE IF NOT EXISTS users_verifications (
|
|
155
|
+
id VARCHAR(25) PRIMARY KEY,
|
|
156
|
+
user_id VARCHAR(25) NOT NULL,
|
|
157
|
+
type verification_type NOT NULL,
|
|
158
|
+
token VARCHAR(255) NOT NULL,
|
|
159
|
+
code VARCHAR(10),
|
|
160
|
+
expires_at TIMESTAMP NOT NULL,
|
|
161
|
+
verified_at TIMESTAMP,
|
|
162
|
+
attempts INTEGER DEFAULT 0,
|
|
163
|
+
max_attempts INTEGER DEFAULT 3,
|
|
164
|
+
is_locked BOOLEAN DEFAULT false,
|
|
165
|
+
locked_at TIMESTAMP,
|
|
166
|
+
is_blocked BOOLEAN DEFAULT false,
|
|
167
|
+
blocked_at TIMESTAMP,
|
|
168
|
+
block_reason TEXT,
|
|
169
|
+
is_public BOOLEAN DEFAULT true,
|
|
170
|
+
language VARCHAR(10) DEFAULT 'en',
|
|
171
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
172
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
173
|
+
deleted_at TIMESTAMP,
|
|
174
|
+
CONSTRAINT fk_users_verifications_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
|
175
|
+
)
|
|
176
|
+
`,await e`CREATE INDEX IF NOT EXISTS idx_users_verifications_user_id ON users_verifications(user_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_verifications_token ON users_verifications(token)`,await e`CREATE INDEX IF NOT EXISTS idx_users_verifications_code ON users_verifications(code)`,await e`CREATE INDEX IF NOT EXISTS idx_users_verifications_type ON users_verifications(type)`,await e`CREATE INDEX IF NOT EXISTS idx_users_verifications_expires_at ON users_verifications(expires_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_verifications_verified_at ON users_verifications(verified_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_verifications_created_at ON users_verifications(created_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_verifications_deleted_at ON users_verifications(deleted_at)`}async down(e){await e`DROP TABLE IF EXISTS users_verifications CASCADE`,await e`DROP TYPE IF EXISTS verification_type CASCADE`}getVersion(){return"20251225182641305"}getDependencies(){return[s]}}E=i([n.migration()],E);import{decorator as S}from"@ooneex/migrations";class T{async up(e){await e`CREATE TYPE profile_update_status AS ENUM ('pending', 'approved', 'rejected', 'applied')`,await e`
|
|
177
|
+
CREATE TABLE IF NOT EXISTS users_profile_updates (
|
|
178
|
+
id VARCHAR(25) PRIMARY KEY,
|
|
179
|
+
user_id VARCHAR(25) NOT NULL,
|
|
180
|
+
verification_id VARCHAR(25),
|
|
181
|
+
changed_fields TEXT NOT NULL,
|
|
182
|
+
previous_values JSONB,
|
|
183
|
+
new_values JSONB,
|
|
184
|
+
update_reason VARCHAR(255),
|
|
185
|
+
ip_address INET,
|
|
186
|
+
user_agent TEXT,
|
|
187
|
+
requires_verification BOOLEAN DEFAULT false,
|
|
188
|
+
status profile_update_status NOT NULL,
|
|
189
|
+
applied_at TIMESTAMP,
|
|
190
|
+
metadata JSONB,
|
|
191
|
+
description TEXT,
|
|
192
|
+
is_locked BOOLEAN DEFAULT false,
|
|
193
|
+
locked_at TIMESTAMP,
|
|
194
|
+
is_blocked BOOLEAN DEFAULT false,
|
|
195
|
+
blocked_at TIMESTAMP,
|
|
196
|
+
block_reason TEXT,
|
|
197
|
+
is_public BOOLEAN DEFAULT true,
|
|
198
|
+
language VARCHAR(10) DEFAULT 'en',
|
|
199
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
200
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
201
|
+
deleted_at TIMESTAMP,
|
|
202
|
+
CONSTRAINT fk_users_profile_updates_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
|
203
|
+
CONSTRAINT fk_users_profile_updates_verification FOREIGN KEY (verification_id) REFERENCES users_verifications(id) ON DELETE SET NULL
|
|
204
|
+
)
|
|
205
|
+
`,await e`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_user_id ON users_profile_updates(user_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_verification_id ON users_profile_updates(verification_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_status ON users_profile_updates(status)`,await e`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_applied_at ON users_profile_updates(applied_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_created_at ON users_profile_updates(created_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_deleted_at ON users_profile_updates(deleted_at)`}async down(e){await e`DROP TABLE IF EXISTS users_profile_updates CASCADE`,await e`DROP TYPE IF EXISTS profile_update_status CASCADE`}getVersion(){return"20251225182641307"}getDependencies(){return[s,E]}}T=i([S.migration()],T);import{decorator as l}from"@ooneex/migrations";class _{async up(e){await e`
|
|
206
|
+
CREATE TABLE IF NOT EXISTS users_stats (
|
|
207
|
+
id VARCHAR(25) PRIMARY KEY,
|
|
208
|
+
user_id VARCHAR(25),
|
|
209
|
+
followers_count INTEGER DEFAULT 0,
|
|
210
|
+
following_count INTEGER DEFAULT 0,
|
|
211
|
+
blocked_count INTEGER DEFAULT 0,
|
|
212
|
+
views_count INTEGER DEFAULT 0,
|
|
213
|
+
reports_count INTEGER DEFAULT 0,
|
|
214
|
+
is_locked BOOLEAN DEFAULT false,
|
|
215
|
+
locked_at TIMESTAMP,
|
|
216
|
+
is_blocked BOOLEAN DEFAULT false,
|
|
217
|
+
blocked_at TIMESTAMP,
|
|
218
|
+
block_reason TEXT,
|
|
219
|
+
is_public BOOLEAN DEFAULT true,
|
|
220
|
+
language VARCHAR(10) DEFAULT 'en',
|
|
221
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
222
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
223
|
+
deleted_at TIMESTAMP,
|
|
224
|
+
CONSTRAINT fk_users_stats_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
|
225
|
+
)
|
|
226
|
+
`,await e`CREATE INDEX IF NOT EXISTS idx_users_stats_user_id ON users_stats(user_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_stats_followers_count ON users_stats(followers_count)`,await e`CREATE INDEX IF NOT EXISTS idx_users_stats_following_count ON users_stats(following_count)`,await e`CREATE INDEX IF NOT EXISTS idx_users_stats_views_count ON users_stats(views_count)`,await e`CREATE INDEX IF NOT EXISTS idx_users_stats_created_at ON users_stats(created_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_stats_deleted_at ON users_stats(deleted_at)`}async down(e){await e`DROP TABLE IF EXISTS users_stats CASCADE`}getVersion(){return"20251225182641310"}getDependencies(){return[s]}}_=i([l.migration()],_);import{decorator as p}from"@ooneex/migrations";class t{async up(e){await e`
|
|
227
|
+
CREATE TABLE IF NOT EXISTS users_blocked (
|
|
228
|
+
id VARCHAR(25) PRIMARY KEY,
|
|
229
|
+
user_id VARCHAR(25),
|
|
230
|
+
blocked_by VARCHAR(255),
|
|
231
|
+
blocked_by_id VARCHAR(25),
|
|
232
|
+
reason TEXT,
|
|
233
|
+
is_locked BOOLEAN DEFAULT false,
|
|
234
|
+
locked_at TIMESTAMP,
|
|
235
|
+
is_blocked BOOLEAN DEFAULT false,
|
|
236
|
+
blocked_at TIMESTAMP,
|
|
237
|
+
block_reason TEXT,
|
|
238
|
+
is_public BOOLEAN DEFAULT true,
|
|
239
|
+
language VARCHAR(10) DEFAULT 'en',
|
|
240
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
241
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
242
|
+
deleted_at TIMESTAMP,
|
|
243
|
+
CONSTRAINT fk_users_blocked_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
|
244
|
+
CONSTRAINT fk_users_blocked_blocked_by FOREIGN KEY (blocked_by_id) REFERENCES users(id) ON DELETE CASCADE,
|
|
245
|
+
CONSTRAINT uk_users_blocked_user_blocked_by UNIQUE (user_id, blocked_by_id)
|
|
246
|
+
)
|
|
247
|
+
`,await e`CREATE INDEX IF NOT EXISTS idx_users_blocked_user_id ON users_blocked(user_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_blocked_blocked_by_id ON users_blocked(blocked_by_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_blocked_created_at ON users_blocked(created_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_blocked_deleted_at ON users_blocked(deleted_at)`}async down(e){await e`DROP TABLE IF EXISTS users_blocked CASCADE`}getVersion(){return"20251225182641312"}getDependencies(){return[s]}}t=i([p.migration()],t);import{decorator as R}from"@ooneex/migrations";class o{async up(e){await e`
|
|
248
|
+
CREATE TABLE IF NOT EXISTS users_followed (
|
|
249
|
+
id VARCHAR(25) PRIMARY KEY,
|
|
250
|
+
user_id VARCHAR(25),
|
|
251
|
+
followed_by VARCHAR(255),
|
|
252
|
+
followed_by_id VARCHAR(25),
|
|
253
|
+
is_locked BOOLEAN DEFAULT false,
|
|
254
|
+
locked_at TIMESTAMP,
|
|
255
|
+
is_blocked BOOLEAN DEFAULT false,
|
|
256
|
+
blocked_at TIMESTAMP,
|
|
257
|
+
block_reason TEXT,
|
|
258
|
+
is_public BOOLEAN DEFAULT true,
|
|
259
|
+
language VARCHAR(10) DEFAULT 'en',
|
|
260
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
261
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
262
|
+
deleted_at TIMESTAMP,
|
|
263
|
+
CONSTRAINT fk_users_followed_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
|
264
|
+
CONSTRAINT fk_users_followed_followed_by FOREIGN KEY (followed_by_id) REFERENCES users(id) ON DELETE CASCADE,
|
|
265
|
+
CONSTRAINT uk_users_followed_user_followed_by UNIQUE (user_id, followed_by_id)
|
|
266
|
+
)
|
|
267
|
+
`,await e`CREATE INDEX IF NOT EXISTS idx_users_followed_user_id ON users_followed(user_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_followed_followed_by_id ON users_followed(followed_by_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_followed_created_at ON users_followed(created_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_followed_deleted_at ON users_followed(deleted_at)`}async down(e){await e`DROP TABLE IF EXISTS users_followed CASCADE`}getVersion(){return"20251225182641314"}getDependencies(){return[s]}}o=i([R.migration()],o);import{decorator as O}from"@ooneex/migrations";class d{async up(e){await e`
|
|
268
|
+
CREATE TABLE IF NOT EXISTS users_reports (
|
|
269
|
+
id VARCHAR(25) PRIMARY KEY,
|
|
270
|
+
user_id VARCHAR(25),
|
|
271
|
+
reason VARCHAR(255) NOT NULL,
|
|
272
|
+
description TEXT,
|
|
273
|
+
reported_by VARCHAR(255),
|
|
274
|
+
reported_by_id VARCHAR(25),
|
|
275
|
+
is_locked BOOLEAN DEFAULT false,
|
|
276
|
+
locked_at TIMESTAMP,
|
|
277
|
+
is_blocked BOOLEAN DEFAULT false,
|
|
278
|
+
blocked_at TIMESTAMP,
|
|
279
|
+
block_reason TEXT,
|
|
280
|
+
is_public BOOLEAN DEFAULT true,
|
|
281
|
+
language VARCHAR(10) DEFAULT 'en',
|
|
282
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
283
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
284
|
+
deleted_at TIMESTAMP,
|
|
285
|
+
CONSTRAINT fk_users_reports_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
|
286
|
+
CONSTRAINT fk_users_reports_reported_by FOREIGN KEY (reported_by_id) REFERENCES users(id) ON DELETE CASCADE
|
|
287
|
+
)
|
|
288
|
+
`,await e`CREATE INDEX IF NOT EXISTS idx_users_reports_user_id ON users_reports(user_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_reports_reported_by_id ON users_reports(reported_by_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_reports_reason ON users_reports(reason)`,await e`CREATE INDEX IF NOT EXISTS idx_users_reports_created_at ON users_reports(created_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_reports_deleted_at ON users_reports(deleted_at)`}async down(e){await e`DROP TABLE IF EXISTS users_reports CASCADE`}getVersion(){return"20251225182641316"}getDependencies(){return[s]}}d=i([O.migration()],d);import{decorator as C}from"@ooneex/migrations";class A{async up(e){await e`
|
|
289
|
+
CREATE TABLE IF NOT EXISTS users_viewed (
|
|
290
|
+
id VARCHAR(25) PRIMARY KEY,
|
|
291
|
+
user_id VARCHAR(25),
|
|
292
|
+
viewed_by VARCHAR(255),
|
|
293
|
+
viewed_by_id VARCHAR(25),
|
|
294
|
+
is_locked BOOLEAN DEFAULT false,
|
|
295
|
+
locked_at TIMESTAMP,
|
|
296
|
+
is_blocked BOOLEAN DEFAULT false,
|
|
297
|
+
blocked_at TIMESTAMP,
|
|
298
|
+
block_reason TEXT,
|
|
299
|
+
is_public BOOLEAN DEFAULT true,
|
|
300
|
+
language VARCHAR(10) DEFAULT 'en',
|
|
301
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
302
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
303
|
+
deleted_at TIMESTAMP,
|
|
304
|
+
CONSTRAINT fk_users_viewed_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
|
305
|
+
CONSTRAINT fk_users_viewed_viewed_by FOREIGN KEY (viewed_by_id) REFERENCES users(id) ON DELETE CASCADE
|
|
306
|
+
)
|
|
307
|
+
`,await e`CREATE INDEX IF NOT EXISTS idx_users_viewed_user_id ON users_viewed(user_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_viewed_viewed_by_id ON users_viewed(viewed_by_id)`,await e`CREATE INDEX IF NOT EXISTS idx_users_viewed_created_at ON users_viewed(created_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_viewed_deleted_at ON users_viewed(deleted_at)`,await e`CREATE INDEX IF NOT EXISTS idx_users_viewed_user_viewed_by ON users_viewed(user_id, viewed_by_id, created_at)`}async down(e){await e`DROP TABLE IF EXISTS users_viewed CASCADE`}getVersion(){return"20251225182641319"}getDependencies(){return[s]}}A=i([C.migration()],A);export{A as Migration20251225182641319,d as Migration20251225182641316,o as Migration20251225182641314,t as Migration20251225182641312,_ as Migration20251225182641310,T as Migration20251225182641307,E as Migration20251225182641305,r as Migration20251225182641303,a as Migration20251225182641300,s as Migration20251225182641298};
|
|
308
|
+
|
|
309
|
+
//# debugId=65F62B41260B565464756E2164756E21
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["src/migrations/user/Migration20251225182641298.ts", "src/migrations/user/Migration20251225182641300.ts", "src/migrations/user/Migration20251225182641303.ts", "src/migrations/user/Migration20251225182641305.ts", "src/migrations/user/Migration20251225182641307.ts", "src/migrations/user/Migration20251225182641310.ts", "src/migrations/user/Migration20251225182641312.ts", "src/migrations/user/Migration20251225182641314.ts", "src/migrations/user/Migration20251225182641316.ts", "src/migrations/user/Migration20251225182641319.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225181613479 } from \"../image/Migration20251225181613479\";\n\n@decorator.migration()\nexport class Migration20251225182641298 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS users (\n id VARCHAR(25) PRIMARY KEY,\n email VARCHAR(255) NOT NULL UNIQUE,\n roles TEXT NOT NULL,\n name VARCHAR(255),\n last_name VARCHAR(255),\n first_name VARCHAR(255),\n username VARCHAR(100) UNIQUE,\n avatar_id VARCHAR(25),\n bio TEXT,\n phone VARCHAR(20),\n birth_date DATE,\n timezone VARCHAR(50),\n is_email_verified BOOLEAN DEFAULT false,\n is_phone_verified BOOLEAN DEFAULT false,\n last_active_at TIMESTAMPTZ,\n email_verified_at TIMESTAMPTZ,\n phone_verified_at TIMESTAMPTZ,\n last_login_at TIMESTAMPTZ,\n password_changed_at TIMESTAMPTZ,\n two_factor_enabled BOOLEAN DEFAULT false,\n two_factor_secret VARCHAR(255),\n recovery_tokens TEXT,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ,\n CONSTRAINT fk_users_avatar FOREIGN KEY (avatar_id) REFERENCES images(id) ON DELETE SET NULL\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_email ON users(email)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_username ON users(username)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_phone ON users(phone)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_is_email_verified ON users(is_email_verified)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_is_phone_verified ON users(is_phone_verified)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_last_active_at ON users(last_active_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_last_login_at ON users(last_login_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_two_factor_enabled ON users(two_factor_enabled)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_language ON users(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_deleted_at ON users(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_is_public ON users(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_created_at ON users(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_updated_at ON users(updated_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_users_active ON users(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS users CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182641298\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [\n Migration20251225181613479, // Images table (for avatar_id foreign key)\n ];\n }\n}\n",
|
|
6
|
+
"import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182641298 } from \"./Migration20251225182641298\";\n\n@decorator.migration()\nexport class Migration20251225182641300 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TYPE account_type AS ENUM ('oauth', 'email', 'credentials', 'webauthn')\n `;\n\n await tx`\n CREATE TABLE IF NOT EXISTS accounts (\n id VARCHAR(25) PRIMARY KEY,\n provider VARCHAR(100),\n provider_account_id VARCHAR(255),\n type account_type NOT NULL,\n password VARCHAR(255),\n access_token TEXT,\n access_token_expires_at TIMESTAMPTZ,\n refresh_token TEXT,\n refresh_token_expires_at TIMESTAMPTZ,\n expires_at TIMESTAMPTZ,\n token_type VARCHAR(50),\n scope TEXT,\n id_token TEXT,\n session_state VARCHAR(255),\n email VARCHAR(255),\n email_verified BOOLEAN DEFAULT false,\n name VARCHAR(255),\n picture VARCHAR(500),\n profile JSONB,\n user_id VARCHAR(25),\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMPTZ,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMPTZ,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n deleted_at TIMESTAMPTZ,\n CONSTRAINT fk_accounts_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE\n )\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_user_id ON accounts(user_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_provider ON accounts(provider)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_provider_account_id ON accounts(provider_account_id)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_type ON accounts(type)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_email ON accounts(email)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_expires_at ON accounts(expires_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_language ON accounts(language)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_deleted_at ON accounts(deleted_at)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_is_public ON accounts(is_public) WHERE deleted_at IS NULL\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_created_at ON accounts(created_at DESC)\n `;\n\n await tx`\n CREATE INDEX IF NOT EXISTS idx_accounts_active ON accounts(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false\n `;\n\n await tx`\n CREATE UNIQUE INDEX IF NOT EXISTS idx_accounts_provider_unique ON accounts(provider, provider_account_id) WHERE deleted_at IS NULL\n `;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS accounts CASCADE`;\n await tx`DROP TYPE IF EXISTS account_type CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182641300\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [\n Migration20251225182641298, // Users table\n ];\n }\n}\n",
|
|
7
|
+
"import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182641298 } from \"./Migration20251225182641298\";\n\n@decorator.migration()\nexport class Migration20251225182641303 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS users_sessions (\n id VARCHAR(25) PRIMARY KEY,\n user_id VARCHAR(25) NOT NULL,\n token VARCHAR(255) NOT NULL UNIQUE,\n refresh_token VARCHAR(255),\n expires_at TIMESTAMP NOT NULL,\n ip_address VARCHAR(45),\n user_agent TEXT,\n device VARCHAR(255),\n browser VARCHAR(255),\n os VARCHAR(255),\n is_revoked BOOLEAN DEFAULT false,\n revoked_at TIMESTAMP,\n last_activity_at TIMESTAMP,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMP,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMP,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10) DEFAULT 'en',\n created_at TIMESTAMP DEFAULT NOW(),\n updated_at TIMESTAMP DEFAULT NOW(),\n deleted_at TIMESTAMP,\n CONSTRAINT fk_users_sessions_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE\n )\n `;\n\n await tx`CREATE INDEX IF NOT EXISTS idx_users_sessions_user_id ON users_sessions(user_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_sessions_token ON users_sessions(token)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_sessions_refresh_token ON users_sessions(refresh_token)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_sessions_expires_at ON users_sessions(expires_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_sessions_is_revoked ON users_sessions(is_revoked)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_sessions_active ON users_sessions(user_id, is_revoked, expires_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_sessions_created_at ON users_sessions(created_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_sessions_deleted_at ON users_sessions(deleted_at)`;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS users_sessions CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182641303\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [Migration20251225182641298];\n }\n}\n",
|
|
8
|
+
"import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182641298 } from \"./Migration20251225182641298\";\n\n@decorator.migration()\nexport class Migration20251225182641305 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`CREATE TYPE verification_type AS ENUM ('email', 'phone', 'two_factor')`;\n\n await tx`\n CREATE TABLE IF NOT EXISTS users_verifications (\n id VARCHAR(25) PRIMARY KEY,\n user_id VARCHAR(25) NOT NULL,\n type verification_type NOT NULL,\n token VARCHAR(255) NOT NULL,\n code VARCHAR(10),\n expires_at TIMESTAMP NOT NULL,\n verified_at TIMESTAMP,\n attempts INTEGER DEFAULT 0,\n max_attempts INTEGER DEFAULT 3,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMP,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMP,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10) DEFAULT 'en',\n created_at TIMESTAMP DEFAULT NOW(),\n updated_at TIMESTAMP DEFAULT NOW(),\n deleted_at TIMESTAMP,\n CONSTRAINT fk_users_verifications_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE\n )\n `;\n\n await tx`CREATE INDEX IF NOT EXISTS idx_users_verifications_user_id ON users_verifications(user_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_verifications_token ON users_verifications(token)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_verifications_code ON users_verifications(code)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_verifications_type ON users_verifications(type)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_verifications_expires_at ON users_verifications(expires_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_verifications_verified_at ON users_verifications(verified_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_verifications_created_at ON users_verifications(created_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_verifications_deleted_at ON users_verifications(deleted_at)`;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS users_verifications CASCADE`;\n await tx`DROP TYPE IF EXISTS verification_type CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182641305\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [Migration20251225182641298];\n }\n}\n",
|
|
9
|
+
"import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182641298 } from \"./Migration20251225182641298\";\nimport { Migration20251225182641305 } from \"./Migration20251225182641305\";\n\n@decorator.migration()\nexport class Migration20251225182641307 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`CREATE TYPE profile_update_status AS ENUM ('pending', 'approved', 'rejected', 'applied')`;\n\n await tx`\n CREATE TABLE IF NOT EXISTS users_profile_updates (\n id VARCHAR(25) PRIMARY KEY,\n user_id VARCHAR(25) NOT NULL,\n verification_id VARCHAR(25),\n changed_fields TEXT NOT NULL,\n previous_values JSONB,\n new_values JSONB,\n update_reason VARCHAR(255),\n ip_address INET,\n user_agent TEXT,\n requires_verification BOOLEAN DEFAULT false,\n status profile_update_status NOT NULL,\n applied_at TIMESTAMP,\n metadata JSONB,\n description TEXT,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMP,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMP,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10) DEFAULT 'en',\n created_at TIMESTAMP DEFAULT NOW(),\n updated_at TIMESTAMP DEFAULT NOW(),\n deleted_at TIMESTAMP,\n CONSTRAINT fk_users_profile_updates_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,\n CONSTRAINT fk_users_profile_updates_verification FOREIGN KEY (verification_id) REFERENCES users_verifications(id) ON DELETE SET NULL\n )\n `;\n\n await tx`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_user_id ON users_profile_updates(user_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_verification_id ON users_profile_updates(verification_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_status ON users_profile_updates(status)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_applied_at ON users_profile_updates(applied_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_created_at ON users_profile_updates(created_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_profile_updates_deleted_at ON users_profile_updates(deleted_at)`;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS users_profile_updates CASCADE`;\n await tx`DROP TYPE IF EXISTS profile_update_status CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182641307\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [Migration20251225182641298, Migration20251225182641305];\n }\n}\n",
|
|
10
|
+
"import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182641298 } from \"./Migration20251225182641298\";\n\n@decorator.migration()\nexport class Migration20251225182641310 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS users_stats (\n id VARCHAR(25) PRIMARY KEY,\n user_id VARCHAR(25),\n followers_count INTEGER DEFAULT 0,\n following_count INTEGER DEFAULT 0,\n blocked_count INTEGER DEFAULT 0,\n views_count INTEGER DEFAULT 0,\n reports_count INTEGER DEFAULT 0,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMP,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMP,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10) DEFAULT 'en',\n created_at TIMESTAMP DEFAULT NOW(),\n updated_at TIMESTAMP DEFAULT NOW(),\n deleted_at TIMESTAMP,\n CONSTRAINT fk_users_stats_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE\n )\n `;\n\n await tx`CREATE INDEX IF NOT EXISTS idx_users_stats_user_id ON users_stats(user_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_stats_followers_count ON users_stats(followers_count)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_stats_following_count ON users_stats(following_count)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_stats_views_count ON users_stats(views_count)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_stats_created_at ON users_stats(created_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_stats_deleted_at ON users_stats(deleted_at)`;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS users_stats CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182641310\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [Migration20251225182641298];\n }\n}\n",
|
|
11
|
+
"import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182641298 } from \"./Migration20251225182641298\";\n\n@decorator.migration()\nexport class Migration20251225182641312 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS users_blocked (\n id VARCHAR(25) PRIMARY KEY,\n user_id VARCHAR(25),\n blocked_by VARCHAR(255),\n blocked_by_id VARCHAR(25),\n reason TEXT,\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMP,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMP,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10) DEFAULT 'en',\n created_at TIMESTAMP DEFAULT NOW(),\n updated_at TIMESTAMP DEFAULT NOW(),\n deleted_at TIMESTAMP,\n CONSTRAINT fk_users_blocked_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,\n CONSTRAINT fk_users_blocked_blocked_by FOREIGN KEY (blocked_by_id) REFERENCES users(id) ON DELETE CASCADE,\n CONSTRAINT uk_users_blocked_user_blocked_by UNIQUE (user_id, blocked_by_id)\n )\n `;\n\n await tx`CREATE INDEX IF NOT EXISTS idx_users_blocked_user_id ON users_blocked(user_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_blocked_blocked_by_id ON users_blocked(blocked_by_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_blocked_created_at ON users_blocked(created_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_blocked_deleted_at ON users_blocked(deleted_at)`;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS users_blocked CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182641312\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [Migration20251225182641298];\n }\n}\n",
|
|
12
|
+
"import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182641298 } from \"./Migration20251225182641298\";\n\n@decorator.migration()\nexport class Migration20251225182641314 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS users_followed (\n id VARCHAR(25) PRIMARY KEY,\n user_id VARCHAR(25),\n followed_by VARCHAR(255),\n followed_by_id VARCHAR(25),\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMP,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMP,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10) DEFAULT 'en',\n created_at TIMESTAMP DEFAULT NOW(),\n updated_at TIMESTAMP DEFAULT NOW(),\n deleted_at TIMESTAMP,\n CONSTRAINT fk_users_followed_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,\n CONSTRAINT fk_users_followed_followed_by FOREIGN KEY (followed_by_id) REFERENCES users(id) ON DELETE CASCADE,\n CONSTRAINT uk_users_followed_user_followed_by UNIQUE (user_id, followed_by_id)\n )\n `;\n\n await tx`CREATE INDEX IF NOT EXISTS idx_users_followed_user_id ON users_followed(user_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_followed_followed_by_id ON users_followed(followed_by_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_followed_created_at ON users_followed(created_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_followed_deleted_at ON users_followed(deleted_at)`;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS users_followed CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182641314\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [Migration20251225182641298];\n }\n}\n",
|
|
13
|
+
"import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182641298 } from \"./Migration20251225182641298\";\n\n@decorator.migration()\nexport class Migration20251225182641316 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS users_reports (\n id VARCHAR(25) PRIMARY KEY,\n user_id VARCHAR(25),\n reason VARCHAR(255) NOT NULL,\n description TEXT,\n reported_by VARCHAR(255),\n reported_by_id VARCHAR(25),\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMP,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMP,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10) DEFAULT 'en',\n created_at TIMESTAMP DEFAULT NOW(),\n updated_at TIMESTAMP DEFAULT NOW(),\n deleted_at TIMESTAMP,\n CONSTRAINT fk_users_reports_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,\n CONSTRAINT fk_users_reports_reported_by FOREIGN KEY (reported_by_id) REFERENCES users(id) ON DELETE CASCADE\n )\n `;\n\n await tx`CREATE INDEX IF NOT EXISTS idx_users_reports_user_id ON users_reports(user_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_reports_reported_by_id ON users_reports(reported_by_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_reports_reason ON users_reports(reason)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_reports_created_at ON users_reports(created_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_reports_deleted_at ON users_reports(deleted_at)`;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS users_reports CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182641316\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [Migration20251225182641298];\n }\n}\n",
|
|
14
|
+
"import { decorator, type IMigration, type MigrationClassType } from \"@ooneex/migrations\";\nimport type { TransactionSQL } from \"bun\";\nimport { Migration20251225182641298 } from \"./Migration20251225182641298\";\n\n@decorator.migration()\nexport class Migration20251225182641319 implements IMigration {\n public async up(tx: TransactionSQL): Promise<void> {\n await tx`\n CREATE TABLE IF NOT EXISTS users_viewed (\n id VARCHAR(25) PRIMARY KEY,\n user_id VARCHAR(25),\n viewed_by VARCHAR(255),\n viewed_by_id VARCHAR(25),\n is_locked BOOLEAN DEFAULT false,\n locked_at TIMESTAMP,\n is_blocked BOOLEAN DEFAULT false,\n blocked_at TIMESTAMP,\n block_reason TEXT,\n is_public BOOLEAN DEFAULT true,\n language VARCHAR(10) DEFAULT 'en',\n created_at TIMESTAMP DEFAULT NOW(),\n updated_at TIMESTAMP DEFAULT NOW(),\n deleted_at TIMESTAMP,\n CONSTRAINT fk_users_viewed_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,\n CONSTRAINT fk_users_viewed_viewed_by FOREIGN KEY (viewed_by_id) REFERENCES users(id) ON DELETE CASCADE\n )\n `;\n\n await tx`CREATE INDEX IF NOT EXISTS idx_users_viewed_user_id ON users_viewed(user_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_viewed_viewed_by_id ON users_viewed(viewed_by_id)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_viewed_created_at ON users_viewed(created_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_viewed_deleted_at ON users_viewed(deleted_at)`;\n await tx`CREATE INDEX IF NOT EXISTS idx_users_viewed_user_viewed_by ON users_viewed(user_id, viewed_by_id, created_at)`;\n }\n\n public async down(tx: TransactionSQL): Promise<void> {\n await tx`DROP TABLE IF EXISTS users_viewed CASCADE`;\n }\n\n public getVersion(): string {\n return \"20251225182641319\";\n }\n\n public getDependencies(): MigrationClassType[] {\n return [Migration20251225182641298];\n }\n}\n"
|
|
15
|
+
],
|
|
16
|
+
"mappings": "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",
|
|
17
|
+
"debugId": "65F62B41260B565464756E2164756E21",
|
|
18
|
+
"names": []
|
|
19
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { IMigration, MigrationClassType } from "@ooneex/migrations";
|
|
2
|
+
import { TransactionSQL } from "bun";
|
|
3
|
+
declare class Migration20251225184023570 implements IMigration {
|
|
4
|
+
up(tx: TransactionSQL): Promise<void>;
|
|
5
|
+
down(tx: TransactionSQL): Promise<void>;
|
|
6
|
+
getVersion(): string;
|
|
7
|
+
getDependencies(): MigrationClassType[];
|
|
8
|
+
}
|
|
9
|
+
import { IMigration as IMigration2, MigrationClassType as MigrationClassType2 } from "@ooneex/migrations";
|
|
10
|
+
import { TransactionSQL as TransactionSQL2 } from "bun";
|
|
11
|
+
declare class Migration20251225184023573 implements IMigration2 {
|
|
12
|
+
up(tx: TransactionSQL2): Promise<void>;
|
|
13
|
+
down(tx: TransactionSQL2): Promise<void>;
|
|
14
|
+
getVersion(): string;
|
|
15
|
+
getDependencies(): MigrationClassType2[];
|
|
16
|
+
}
|
|
17
|
+
import { IMigration as IMigration3, MigrationClassType as MigrationClassType3 } from "@ooneex/migrations";
|
|
18
|
+
import { TransactionSQL as TransactionSQL3 } from "bun";
|
|
19
|
+
declare class Migration20251225184023575 implements IMigration3 {
|
|
20
|
+
up(tx: TransactionSQL3): Promise<void>;
|
|
21
|
+
down(tx: TransactionSQL3): Promise<void>;
|
|
22
|
+
getVersion(): string;
|
|
23
|
+
getDependencies(): MigrationClassType3[];
|
|
24
|
+
}
|
|
25
|
+
import { IMigration as IMigration4, MigrationClassType as MigrationClassType4 } from "@ooneex/migrations";
|
|
26
|
+
import { TransactionSQL as TransactionSQL4 } from "bun";
|
|
27
|
+
declare class Migration20251225184023577 implements IMigration4 {
|
|
28
|
+
up(tx: TransactionSQL4): Promise<void>;
|
|
29
|
+
down(tx: TransactionSQL4): Promise<void>;
|
|
30
|
+
getVersion(): string;
|
|
31
|
+
getDependencies(): MigrationClassType4[];
|
|
32
|
+
}
|
|
33
|
+
import { IMigration as IMigration5, MigrationClassType as MigrationClassType5 } from "@ooneex/migrations";
|
|
34
|
+
import { TransactionSQL as TransactionSQL5 } from "bun";
|
|
35
|
+
declare class Migration20251225184023579 implements IMigration5 {
|
|
36
|
+
up(tx: TransactionSQL5): Promise<void>;
|
|
37
|
+
down(tx: TransactionSQL5): Promise<void>;
|
|
38
|
+
getVersion(): string;
|
|
39
|
+
getDependencies(): MigrationClassType5[];
|
|
40
|
+
}
|
|
41
|
+
import { IMigration as IMigration6, MigrationClassType as MigrationClassType6 } from "@ooneex/migrations";
|
|
42
|
+
import { TransactionSQL as TransactionSQL6 } from "bun";
|
|
43
|
+
declare class Migration20251225184023582 implements IMigration6 {
|
|
44
|
+
up(tx: TransactionSQL6): Promise<void>;
|
|
45
|
+
down(tx: TransactionSQL6): Promise<void>;
|
|
46
|
+
getVersion(): string;
|
|
47
|
+
getDependencies(): MigrationClassType6[];
|
|
48
|
+
}
|
|
49
|
+
import { IMigration as IMigration7, MigrationClassType as MigrationClassType7 } from "@ooneex/migrations";
|
|
50
|
+
import { TransactionSQL as TransactionSQL7 } from "bun";
|
|
51
|
+
declare class Migration20251225184023584 implements IMigration7 {
|
|
52
|
+
up(tx: TransactionSQL7): Promise<void>;
|
|
53
|
+
down(tx: TransactionSQL7): Promise<void>;
|
|
54
|
+
getVersion(): string;
|
|
55
|
+
getDependencies(): MigrationClassType7[];
|
|
56
|
+
}
|
|
57
|
+
import { IMigration as IMigration8, MigrationClassType as MigrationClassType8 } from "@ooneex/migrations";
|
|
58
|
+
import { TransactionSQL as TransactionSQL8 } from "bun";
|
|
59
|
+
declare class Migration20251225184023586 implements IMigration8 {
|
|
60
|
+
up(tx: TransactionSQL8): Promise<void>;
|
|
61
|
+
down(tx: TransactionSQL8): Promise<void>;
|
|
62
|
+
getVersion(): string;
|
|
63
|
+
getDependencies(): MigrationClassType8[];
|
|
64
|
+
}
|
|
65
|
+
import { IMigration as IMigration9, MigrationClassType as MigrationClassType9 } from "@ooneex/migrations";
|
|
66
|
+
import { TransactionSQL as TransactionSQL9 } from "bun";
|
|
67
|
+
declare class Migration20251225184023588 implements IMigration9 {
|
|
68
|
+
up(tx: TransactionSQL9): Promise<void>;
|
|
69
|
+
down(tx: TransactionSQL9): Promise<void>;
|
|
70
|
+
getVersion(): string;
|
|
71
|
+
getDependencies(): MigrationClassType9[];
|
|
72
|
+
}
|
|
73
|
+
import { IMigration as IMigration10, MigrationClassType as MigrationClassType10 } from "@ooneex/migrations";
|
|
74
|
+
import { TransactionSQL as TransactionSQL10 } from "bun";
|
|
75
|
+
declare class Migration20251225184023590 implements IMigration10 {
|
|
76
|
+
up(tx: TransactionSQL10): Promise<void>;
|
|
77
|
+
down(tx: TransactionSQL10): Promise<void>;
|
|
78
|
+
getVersion(): string;
|
|
79
|
+
getDependencies(): MigrationClassType10[];
|
|
80
|
+
}
|
|
81
|
+
import { IMigration as IMigration11, MigrationClassType as MigrationClassType11 } from "@ooneex/migrations";
|
|
82
|
+
import { TransactionSQL as TransactionSQL11 } from "bun";
|
|
83
|
+
declare class Migration20251225184023593 implements IMigration11 {
|
|
84
|
+
up(tx: TransactionSQL11): Promise<void>;
|
|
85
|
+
down(tx: TransactionSQL11): Promise<void>;
|
|
86
|
+
getVersion(): string;
|
|
87
|
+
getDependencies(): MigrationClassType11[];
|
|
88
|
+
}
|
|
89
|
+
import { IMigration as IMigration12, MigrationClassType as MigrationClassType12 } from "@ooneex/migrations";
|
|
90
|
+
import { TransactionSQL as TransactionSQL12 } from "bun";
|
|
91
|
+
declare class Migration20251225184023595 implements IMigration12 {
|
|
92
|
+
up(tx: TransactionSQL12): Promise<void>;
|
|
93
|
+
down(tx: TransactionSQL12): Promise<void>;
|
|
94
|
+
getVersion(): string;
|
|
95
|
+
getDependencies(): MigrationClassType12[];
|
|
96
|
+
}
|
|
97
|
+
export { Migration20251225184023595, Migration20251225184023593, Migration20251225184023590, Migration20251225184023588, Migration20251225184023586, Migration20251225184023584, Migration20251225184023582, Migration20251225184023579, Migration20251225184023577, Migration20251225184023575, Migration20251225184023573, Migration20251225184023570 };
|