create-authhero 0.7.0 → 0.8.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/cloudflare-simple/README.md +109 -10
- package/dist/cloudflare-simple/drizzle.config.ts +8 -0
- package/dist/cloudflare-simple/migrations/0000_init.sql +782 -0
- package/dist/cloudflare-simple/migrations/meta/0000_snapshot.json +5325 -0
- package/dist/cloudflare-simple/migrations/meta/_journal.json +13 -0
- package/dist/cloudflare-simple/seed-helper.js +75 -0
- package/dist/cloudflare-simple/src/app.ts +10 -0
- package/dist/cloudflare-simple/src/db/schema.ts +845 -0
- package/dist/cloudflare-simple/src/index.ts +32 -14
- package/dist/cloudflare-simple/src/seed.ts +64 -0
- package/dist/cloudflare-simple/wrangler.toml +2 -0
- package/dist/create-authhero.js +177 -98
- package/package.json +1 -1
|
@@ -0,0 +1,782 @@
|
|
|
1
|
+
CREATE TABLE `tenant_settings` (
|
|
2
|
+
`tenant_id` text(191) PRIMARY KEY NOT NULL,
|
|
3
|
+
`idle_session_lifetime` integer,
|
|
4
|
+
`session_lifetime` integer,
|
|
5
|
+
`session_cookie` text,
|
|
6
|
+
`enable_client_connections` integer,
|
|
7
|
+
`default_redirection_uri` text,
|
|
8
|
+
`enabled_locales` text,
|
|
9
|
+
`default_directory` text(255),
|
|
10
|
+
`error_page` text,
|
|
11
|
+
`flags` text,
|
|
12
|
+
`friendly_name` text(255),
|
|
13
|
+
`picture_url` text,
|
|
14
|
+
`support_email` text(255),
|
|
15
|
+
`support_url` text,
|
|
16
|
+
`sandbox_version` text(50),
|
|
17
|
+
`sandbox_versions_available` text,
|
|
18
|
+
`change_password` text,
|
|
19
|
+
`guardian_mfa_page` text,
|
|
20
|
+
`default_audience` text(255),
|
|
21
|
+
`default_organization` text(255),
|
|
22
|
+
`sessions` text,
|
|
23
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
24
|
+
);
|
|
25
|
+
--> statement-breakpoint
|
|
26
|
+
CREATE TABLE `tenants` (
|
|
27
|
+
`id` text(255) PRIMARY KEY NOT NULL,
|
|
28
|
+
`name` text(255),
|
|
29
|
+
`audience` text(255),
|
|
30
|
+
`sender_email` text(255),
|
|
31
|
+
`sender_name` text(255),
|
|
32
|
+
`language` text(255),
|
|
33
|
+
`logo` text(255),
|
|
34
|
+
`primary_color` text(255),
|
|
35
|
+
`secondary_color` text(255),
|
|
36
|
+
`created_at` text(255) NOT NULL,
|
|
37
|
+
`updated_at` text(255) NOT NULL,
|
|
38
|
+
`support_url` text(255),
|
|
39
|
+
`idle_session_lifetime` integer,
|
|
40
|
+
`session_lifetime` integer,
|
|
41
|
+
`session_cookie` text,
|
|
42
|
+
`allowed_logout_urls` text,
|
|
43
|
+
`ephemeral_session_lifetime` integer,
|
|
44
|
+
`idle_ephemeral_session_lifetime` integer,
|
|
45
|
+
`default_redirection_uri` text,
|
|
46
|
+
`enabled_locales` text,
|
|
47
|
+
`default_directory` text(255),
|
|
48
|
+
`error_page` text,
|
|
49
|
+
`flags` text,
|
|
50
|
+
`friendly_name` text(255),
|
|
51
|
+
`picture_url` text,
|
|
52
|
+
`support_email` text(255),
|
|
53
|
+
`sandbox_version` text(50),
|
|
54
|
+
`sandbox_versions_available` text,
|
|
55
|
+
`legacy_sandbox_version` text(50),
|
|
56
|
+
`change_password` text,
|
|
57
|
+
`guardian_mfa_page` text,
|
|
58
|
+
`device_flow` text,
|
|
59
|
+
`default_token_quota` text,
|
|
60
|
+
`default_audience` text(255),
|
|
61
|
+
`default_organization` text(255),
|
|
62
|
+
`sessions` text,
|
|
63
|
+
`oidc_logout` text,
|
|
64
|
+
`allow_organization_name_in_authentication_api` integer,
|
|
65
|
+
`customize_mfa_in_postlogin_action` integer,
|
|
66
|
+
`acr_values_supported` text,
|
|
67
|
+
`mtls` text,
|
|
68
|
+
`pushed_authorization_requests_supported` integer,
|
|
69
|
+
`authorization_response_iss_parameter_supported` integer
|
|
70
|
+
);
|
|
71
|
+
--> statement-breakpoint
|
|
72
|
+
CREATE TABLE `password_history` (
|
|
73
|
+
`id` text(21) PRIMARY KEY NOT NULL,
|
|
74
|
+
`user_id` text(191) NOT NULL,
|
|
75
|
+
`tenant_id` text(191) NOT NULL,
|
|
76
|
+
`password` text(255) NOT NULL,
|
|
77
|
+
`algorithm` text(255) DEFAULT 'bcrypt' NOT NULL,
|
|
78
|
+
`created_at` text(35) NOT NULL,
|
|
79
|
+
`updated_at` text(35) NOT NULL,
|
|
80
|
+
`is_current` integer DEFAULT 1 NOT NULL,
|
|
81
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
82
|
+
);
|
|
83
|
+
--> statement-breakpoint
|
|
84
|
+
CREATE TABLE `passwords` (
|
|
85
|
+
`id` text(21) PRIMARY KEY NOT NULL,
|
|
86
|
+
`tenant_id` text(255) NOT NULL,
|
|
87
|
+
`user_id` text(255) NOT NULL,
|
|
88
|
+
`created_at` text(255) NOT NULL,
|
|
89
|
+
`updated_at` text(255) NOT NULL,
|
|
90
|
+
`password` text(255) NOT NULL,
|
|
91
|
+
`algorithm` text(16) DEFAULT 'bcrypt' NOT NULL,
|
|
92
|
+
`is_current` integer DEFAULT 1 NOT NULL
|
|
93
|
+
);
|
|
94
|
+
--> statement-breakpoint
|
|
95
|
+
CREATE TABLE `users` (
|
|
96
|
+
`user_id` text(255) NOT NULL,
|
|
97
|
+
`tenant_id` text(255) NOT NULL,
|
|
98
|
+
`email` text(255),
|
|
99
|
+
`given_name` text(255),
|
|
100
|
+
`family_name` text(255),
|
|
101
|
+
`nickname` text(255),
|
|
102
|
+
`name` text(255),
|
|
103
|
+
`picture` text(2083),
|
|
104
|
+
`tags` text(255),
|
|
105
|
+
`phone_number` text(17),
|
|
106
|
+
`phone_verified` integer,
|
|
107
|
+
`username` text(128),
|
|
108
|
+
`created_at` text(255) NOT NULL,
|
|
109
|
+
`updated_at` text(255) NOT NULL,
|
|
110
|
+
`linked_to` text(255),
|
|
111
|
+
`last_ip` text(255),
|
|
112
|
+
`login_count` integer NOT NULL,
|
|
113
|
+
`last_login` text(255),
|
|
114
|
+
`provider` text(255) NOT NULL,
|
|
115
|
+
`connection` text(255),
|
|
116
|
+
`email_verified` integer NOT NULL,
|
|
117
|
+
`is_social` integer NOT NULL,
|
|
118
|
+
`app_metadata` text(4096) DEFAULT '{}' NOT NULL,
|
|
119
|
+
`user_metadata` text(4096) DEFAULT '{}' NOT NULL,
|
|
120
|
+
`profileData` text(2048),
|
|
121
|
+
`locale` text(255),
|
|
122
|
+
PRIMARY KEY(`user_id`, `tenant_id`),
|
|
123
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
124
|
+
);
|
|
125
|
+
--> statement-breakpoint
|
|
126
|
+
CREATE UNIQUE INDEX `unique_email_provider` ON `users` (`email`,`provider`,`tenant_id`);--> statement-breakpoint
|
|
127
|
+
CREATE UNIQUE INDEX `unique_phone_provider` ON `users` (`phone_number`,`provider`,`tenant_id`);--> statement-breakpoint
|
|
128
|
+
CREATE INDEX `users_email_index` ON `users` (`email`);--> statement-breakpoint
|
|
129
|
+
CREATE INDEX `users_linked_to_index` ON `users` (`linked_to`);--> statement-breakpoint
|
|
130
|
+
CREATE INDEX `users_name_index` ON `users` (`name`);--> statement-breakpoint
|
|
131
|
+
CREATE INDEX `users_phone_tenant_provider_index` ON `users` (`tenant_id`,`phone_number`,`provider`);--> statement-breakpoint
|
|
132
|
+
CREATE TABLE `authentication_codes` (
|
|
133
|
+
`tenant_id` text(255) NOT NULL,
|
|
134
|
+
`code` text(255) PRIMARY KEY NOT NULL,
|
|
135
|
+
`client_id` text(255) NOT NULL,
|
|
136
|
+
`user_id` text(255) NOT NULL,
|
|
137
|
+
`nonce` text(255),
|
|
138
|
+
`state` text(8192),
|
|
139
|
+
`scope` text(1024),
|
|
140
|
+
`response_type` text(256),
|
|
141
|
+
`response_mode` text(256),
|
|
142
|
+
`redirect_uri` text(1024),
|
|
143
|
+
`created_at` text(255) NOT NULL,
|
|
144
|
+
`expires_at` text(255) NOT NULL,
|
|
145
|
+
`used_at` text(255),
|
|
146
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
147
|
+
);
|
|
148
|
+
--> statement-breakpoint
|
|
149
|
+
CREATE TABLE `codes` (
|
|
150
|
+
`code_id` text(255) NOT NULL,
|
|
151
|
+
`tenant_id` text(255) NOT NULL,
|
|
152
|
+
`user_id` text(255),
|
|
153
|
+
`login_id` text(255),
|
|
154
|
+
`connection_id` text(255),
|
|
155
|
+
`code_type` text(255) NOT NULL,
|
|
156
|
+
`created_at` text(255) NOT NULL,
|
|
157
|
+
`expires_at` text(255) NOT NULL,
|
|
158
|
+
`used_at` text(255),
|
|
159
|
+
`code_verifier` text(128),
|
|
160
|
+
`code_challenge` text(128),
|
|
161
|
+
`code_challenge_method` text(5),
|
|
162
|
+
`redirect_uri` text(1024),
|
|
163
|
+
`nonce` text(1024),
|
|
164
|
+
`state` text(2048),
|
|
165
|
+
PRIMARY KEY(`code_id`, `code_type`),
|
|
166
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
167
|
+
);
|
|
168
|
+
--> statement-breakpoint
|
|
169
|
+
CREATE INDEX `codes_expires_at_index` ON `codes` (`expires_at`);--> statement-breakpoint
|
|
170
|
+
CREATE TABLE `login_sessions` (
|
|
171
|
+
`id` text(21) NOT NULL,
|
|
172
|
+
`tenant_id` text(255) NOT NULL,
|
|
173
|
+
`session_id` text(21),
|
|
174
|
+
`csrf_token` text(21) NOT NULL,
|
|
175
|
+
`authParams_client_id` text(191) NOT NULL,
|
|
176
|
+
`authParams_vendor_id` text(255),
|
|
177
|
+
`authParams_username` text(255),
|
|
178
|
+
`authParams_response_type` text(255),
|
|
179
|
+
`authParams_response_mode` text(255),
|
|
180
|
+
`authParams_audience` text(255),
|
|
181
|
+
`authParams_scope` text,
|
|
182
|
+
`authParams_state` text,
|
|
183
|
+
`authParams_nonce` text(255),
|
|
184
|
+
`authParams_code_challenge_method` text(255),
|
|
185
|
+
`authParams_code_challenge` text(255),
|
|
186
|
+
`authParams_redirect_uri` text,
|
|
187
|
+
`authParams_organization` text(255),
|
|
188
|
+
`authParams_prompt` text(32),
|
|
189
|
+
`authParams_act_as` text(256),
|
|
190
|
+
`authParams_ui_locales` text(32),
|
|
191
|
+
`authorization_url` text,
|
|
192
|
+
`created_at` text(35) NOT NULL,
|
|
193
|
+
`updated_at` text(35) NOT NULL,
|
|
194
|
+
`expires_at` text(35) NOT NULL,
|
|
195
|
+
`ip` text(39),
|
|
196
|
+
`useragent` text,
|
|
197
|
+
`auth0Client` text(255),
|
|
198
|
+
`login_completed` integer DEFAULT 0,
|
|
199
|
+
PRIMARY KEY(`tenant_id`, `id`)
|
|
200
|
+
);
|
|
201
|
+
--> statement-breakpoint
|
|
202
|
+
CREATE INDEX `login_sessions_id_index` ON `login_sessions` (`id`);--> statement-breakpoint
|
|
203
|
+
CREATE TABLE `otps` (
|
|
204
|
+
`tenant_id` text(255) NOT NULL,
|
|
205
|
+
`id` text(255) PRIMARY KEY NOT NULL,
|
|
206
|
+
`client_id` text(255) NOT NULL,
|
|
207
|
+
`code` text(255) NOT NULL,
|
|
208
|
+
`email` text(255) NOT NULL,
|
|
209
|
+
`user_id` text(255),
|
|
210
|
+
`send` text(255),
|
|
211
|
+
`nonce` text(255),
|
|
212
|
+
`state` text(1024),
|
|
213
|
+
`scope` text(1024),
|
|
214
|
+
`response_type` text(256),
|
|
215
|
+
`response_mode` text(256),
|
|
216
|
+
`redirect_uri` text(1024),
|
|
217
|
+
`created_at` text(255) NOT NULL,
|
|
218
|
+
`expires_at` text(255) NOT NULL,
|
|
219
|
+
`used_at` text(255),
|
|
220
|
+
`audience` text(255),
|
|
221
|
+
`ip` text(64),
|
|
222
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
223
|
+
);
|
|
224
|
+
--> statement-breakpoint
|
|
225
|
+
CREATE INDEX `otps_email_index` ON `otps` (`email`);--> statement-breakpoint
|
|
226
|
+
CREATE INDEX `otps_expires_at_index` ON `otps` (`expires_at`);--> statement-breakpoint
|
|
227
|
+
CREATE TABLE `refresh_tokens` (
|
|
228
|
+
`id` text(21) NOT NULL,
|
|
229
|
+
`tenant_id` text(255) NOT NULL,
|
|
230
|
+
`client_id` text(191) NOT NULL,
|
|
231
|
+
`session_id` text(21) NOT NULL,
|
|
232
|
+
`user_id` text(255),
|
|
233
|
+
`resource_servers` text NOT NULL,
|
|
234
|
+
`device` text NOT NULL,
|
|
235
|
+
`rotating` integer NOT NULL,
|
|
236
|
+
`created_at` text(35) NOT NULL,
|
|
237
|
+
`expires_at` text(35),
|
|
238
|
+
`idle_expires_at` text(35),
|
|
239
|
+
`last_exchanged_at` text(35),
|
|
240
|
+
PRIMARY KEY(`tenant_id`, `id`)
|
|
241
|
+
);
|
|
242
|
+
--> statement-breakpoint
|
|
243
|
+
CREATE TABLE `sessions` (
|
|
244
|
+
`id` text(21) NOT NULL,
|
|
245
|
+
`tenant_id` text(191) NOT NULL,
|
|
246
|
+
`user_id` text(255),
|
|
247
|
+
`created_at` text(35) NOT NULL,
|
|
248
|
+
`updated_at` text(35) NOT NULL,
|
|
249
|
+
`expires_at` text(35),
|
|
250
|
+
`idle_expires_at` text(35),
|
|
251
|
+
`authenticated_at` text(35),
|
|
252
|
+
`last_interaction_at` text(35),
|
|
253
|
+
`used_at` text(35),
|
|
254
|
+
`revoked_at` text(35),
|
|
255
|
+
`device` text NOT NULL,
|
|
256
|
+
`clients` text NOT NULL,
|
|
257
|
+
`login_session_id` text(21),
|
|
258
|
+
PRIMARY KEY(`tenant_id`, `id`)
|
|
259
|
+
);
|
|
260
|
+
--> statement-breakpoint
|
|
261
|
+
CREATE INDEX `IDX_sessions_login_session_id` ON `sessions` (`login_session_id`);--> statement-breakpoint
|
|
262
|
+
CREATE TABLE `tickets` (
|
|
263
|
+
`tenant_id` text(255) NOT NULL,
|
|
264
|
+
`id` text(255) PRIMARY KEY NOT NULL,
|
|
265
|
+
`client_id` text(255) NOT NULL,
|
|
266
|
+
`email` text(255) NOT NULL,
|
|
267
|
+
`nonce` text(255),
|
|
268
|
+
`state` text(1024),
|
|
269
|
+
`scope` text(1024),
|
|
270
|
+
`response_type` text(256),
|
|
271
|
+
`response_mode` text(256),
|
|
272
|
+
`redirect_uri` text(1024),
|
|
273
|
+
`created_at` text(255) NOT NULL,
|
|
274
|
+
`expires_at` text(255) NOT NULL,
|
|
275
|
+
`used_at` text(255),
|
|
276
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
277
|
+
);
|
|
278
|
+
--> statement-breakpoint
|
|
279
|
+
CREATE TABLE `client_grants` (
|
|
280
|
+
`id` text(21) NOT NULL,
|
|
281
|
+
`tenant_id` text(191) NOT NULL,
|
|
282
|
+
`client_id` text(191) NOT NULL,
|
|
283
|
+
`audience` text(191) NOT NULL,
|
|
284
|
+
`scope` text DEFAULT '[]',
|
|
285
|
+
`organization_usage` text(32),
|
|
286
|
+
`allow_any_organization` integer DEFAULT 0,
|
|
287
|
+
`is_system` integer DEFAULT 0,
|
|
288
|
+
`subject_type` text(32),
|
|
289
|
+
`authorization_details_types` text DEFAULT '[]',
|
|
290
|
+
`created_at` text(35) NOT NULL,
|
|
291
|
+
`updated_at` text(35) NOT NULL,
|
|
292
|
+
PRIMARY KEY(`tenant_id`, `id`),
|
|
293
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
294
|
+
);
|
|
295
|
+
--> statement-breakpoint
|
|
296
|
+
CREATE INDEX `idx_client_grants_audience` ON `client_grants` (`audience`);--> statement-breakpoint
|
|
297
|
+
CREATE TABLE `clients` (
|
|
298
|
+
`client_id` text(191) NOT NULL,
|
|
299
|
+
`tenant_id` text(191) NOT NULL,
|
|
300
|
+
`name` text(255) NOT NULL,
|
|
301
|
+
`description` text(140),
|
|
302
|
+
`global` integer DEFAULT 0 NOT NULL,
|
|
303
|
+
`client_secret` text(255),
|
|
304
|
+
`app_type` text(64) DEFAULT 'regular_web',
|
|
305
|
+
`logo_uri` text(2083),
|
|
306
|
+
`is_first_party` integer DEFAULT 0 NOT NULL,
|
|
307
|
+
`oidc_conformant` integer DEFAULT 1 NOT NULL,
|
|
308
|
+
`callbacks` text NOT NULL,
|
|
309
|
+
`allowed_origins` text NOT NULL,
|
|
310
|
+
`web_origins` text NOT NULL,
|
|
311
|
+
`client_aliases` text NOT NULL,
|
|
312
|
+
`allowed_clients` text NOT NULL,
|
|
313
|
+
`allowed_logout_urls` text NOT NULL,
|
|
314
|
+
`session_transfer` text NOT NULL,
|
|
315
|
+
`oidc_logout` text NOT NULL,
|
|
316
|
+
`grant_types` text NOT NULL,
|
|
317
|
+
`jwt_configuration` text NOT NULL,
|
|
318
|
+
`signing_keys` text NOT NULL,
|
|
319
|
+
`encryption_key` text NOT NULL,
|
|
320
|
+
`sso` integer DEFAULT 0 NOT NULL,
|
|
321
|
+
`sso_disabled` integer DEFAULT 1 NOT NULL,
|
|
322
|
+
`cross_origin_authentication` integer DEFAULT 0 NOT NULL,
|
|
323
|
+
`cross_origin_loc` text(2083),
|
|
324
|
+
`custom_login_page_on` integer DEFAULT 0 NOT NULL,
|
|
325
|
+
`custom_login_page` text,
|
|
326
|
+
`custom_login_page_preview` text,
|
|
327
|
+
`form_template` text,
|
|
328
|
+
`addons` text NOT NULL,
|
|
329
|
+
`token_endpoint_auth_method` text(64) DEFAULT 'client_secret_basic',
|
|
330
|
+
`client_metadata` text NOT NULL,
|
|
331
|
+
`mobile` text NOT NULL,
|
|
332
|
+
`initiate_login_uri` text(2083),
|
|
333
|
+
`native_social_login` text NOT NULL,
|
|
334
|
+
`refresh_token` text NOT NULL,
|
|
335
|
+
`default_organization` text NOT NULL,
|
|
336
|
+
`organization_usage` text(32) DEFAULT 'deny',
|
|
337
|
+
`organization_require_behavior` text(32) DEFAULT 'no_prompt',
|
|
338
|
+
`client_authentication_methods` text NOT NULL,
|
|
339
|
+
`require_pushed_authorization_requests` integer DEFAULT 0 NOT NULL,
|
|
340
|
+
`require_proof_of_possession` integer DEFAULT 0 NOT NULL,
|
|
341
|
+
`signed_request_object` text NOT NULL,
|
|
342
|
+
`compliance_level` text(64),
|
|
343
|
+
`par_request_expiry` integer,
|
|
344
|
+
`token_quota` text NOT NULL,
|
|
345
|
+
`created_at` text(35) NOT NULL,
|
|
346
|
+
`updated_at` text(35) NOT NULL,
|
|
347
|
+
`connections` text DEFAULT '[]' NOT NULL,
|
|
348
|
+
PRIMARY KEY(`tenant_id`, `client_id`),
|
|
349
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
350
|
+
);
|
|
351
|
+
--> statement-breakpoint
|
|
352
|
+
CREATE TABLE `connections` (
|
|
353
|
+
`id` text(255) PRIMARY KEY NOT NULL,
|
|
354
|
+
`tenant_id` text(255) NOT NULL,
|
|
355
|
+
`name` text(255) NOT NULL,
|
|
356
|
+
`response_type` text(255),
|
|
357
|
+
`response_mode` text(255),
|
|
358
|
+
`strategy` text(64),
|
|
359
|
+
`options` text(2048) DEFAULT '{}' NOT NULL,
|
|
360
|
+
`created_at` text(255) NOT NULL,
|
|
361
|
+
`updated_at` text(255) NOT NULL,
|
|
362
|
+
`display_name` text(255),
|
|
363
|
+
`is_domain_connection` integer,
|
|
364
|
+
`show_as_button` integer,
|
|
365
|
+
`metadata` text(4096),
|
|
366
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
367
|
+
);
|
|
368
|
+
--> statement-breakpoint
|
|
369
|
+
CREATE INDEX `connections_tenant_id_index` ON `connections` (`tenant_id`);--> statement-breakpoint
|
|
370
|
+
CREATE TABLE `custom_domains` (
|
|
371
|
+
`custom_domain_id` text(256) PRIMARY KEY NOT NULL,
|
|
372
|
+
`tenant_id` text(255) NOT NULL,
|
|
373
|
+
`domain` text(255) NOT NULL,
|
|
374
|
+
`primary` integer NOT NULL,
|
|
375
|
+
`status` text(50) NOT NULL,
|
|
376
|
+
`type` text(50) NOT NULL,
|
|
377
|
+
`origin_domain_name` text(255),
|
|
378
|
+
`verification` text(2048),
|
|
379
|
+
`custom_client_ip_header` text(50),
|
|
380
|
+
`tls_policy` text(50),
|
|
381
|
+
`domain_metadata` text(2048),
|
|
382
|
+
`created_at` text(35) NOT NULL,
|
|
383
|
+
`updated_at` text(35) NOT NULL,
|
|
384
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
385
|
+
);
|
|
386
|
+
--> statement-breakpoint
|
|
387
|
+
CREATE TABLE `domains` (
|
|
388
|
+
`id` text(255) PRIMARY KEY NOT NULL,
|
|
389
|
+
`tenant_id` text(255) NOT NULL,
|
|
390
|
+
`domain` text(255) NOT NULL,
|
|
391
|
+
`email_service` text(255),
|
|
392
|
+
`email_api_key` text(255),
|
|
393
|
+
`dkim_private_key` text(2048),
|
|
394
|
+
`dkim_public_key` text(2048),
|
|
395
|
+
`created_at` text(255) NOT NULL,
|
|
396
|
+
`updated_at` text(255) NOT NULL,
|
|
397
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
398
|
+
);
|
|
399
|
+
--> statement-breakpoint
|
|
400
|
+
CREATE TABLE `invites` (
|
|
401
|
+
`id` text(21) PRIMARY KEY NOT NULL,
|
|
402
|
+
`tenant_id` text(191) NOT NULL,
|
|
403
|
+
`organization_id` text(21) NOT NULL,
|
|
404
|
+
`inviter` text NOT NULL,
|
|
405
|
+
`invitee` text NOT NULL,
|
|
406
|
+
`client_id` text(191) NOT NULL,
|
|
407
|
+
`connection_id` text(21),
|
|
408
|
+
`invitation_url` text NOT NULL,
|
|
409
|
+
`created_at` text(35) NOT NULL,
|
|
410
|
+
`expires_at` text(35) NOT NULL,
|
|
411
|
+
`app_metadata` text,
|
|
412
|
+
`user_metadata` text,
|
|
413
|
+
`roles` text,
|
|
414
|
+
`ticket_id` text(191),
|
|
415
|
+
`ttl_sec` integer,
|
|
416
|
+
`send_invitation_email` integer
|
|
417
|
+
);
|
|
418
|
+
--> statement-breakpoint
|
|
419
|
+
CREATE INDEX `idx_invites_tenant_id` ON `invites` (`tenant_id`);--> statement-breakpoint
|
|
420
|
+
CREATE INDEX `idx_invites_organization_id` ON `invites` (`organization_id`);--> statement-breakpoint
|
|
421
|
+
CREATE INDEX `idx_invites_expires_at` ON `invites` (`expires_at`);--> statement-breakpoint
|
|
422
|
+
CREATE INDEX `idx_invites_tenant_created` ON `invites` (`tenant_id`,`created_at`);--> statement-breakpoint
|
|
423
|
+
CREATE TABLE `organizations` (
|
|
424
|
+
`id` text(21) PRIMARY KEY NOT NULL,
|
|
425
|
+
`tenant_id` text(191) NOT NULL,
|
|
426
|
+
`name` text(256) NOT NULL,
|
|
427
|
+
`display_name` text(256),
|
|
428
|
+
`branding` text,
|
|
429
|
+
`metadata` text,
|
|
430
|
+
`enabled_connections` text,
|
|
431
|
+
`token_quota` text,
|
|
432
|
+
`created_at` text(35) NOT NULL,
|
|
433
|
+
`updated_at` text(35) NOT NULL
|
|
434
|
+
);
|
|
435
|
+
--> statement-breakpoint
|
|
436
|
+
CREATE INDEX `idx_organizations_tenant_id` ON `organizations` (`tenant_id`);--> statement-breakpoint
|
|
437
|
+
CREATE TABLE `user_organizations` (
|
|
438
|
+
`id` text(21) PRIMARY KEY NOT NULL,
|
|
439
|
+
`tenant_id` text(191) NOT NULL,
|
|
440
|
+
`user_id` text(191) NOT NULL,
|
|
441
|
+
`organization_id` text(21) NOT NULL,
|
|
442
|
+
`created_at` text(35) NOT NULL,
|
|
443
|
+
`updated_at` text(35) NOT NULL
|
|
444
|
+
);
|
|
445
|
+
--> statement-breakpoint
|
|
446
|
+
CREATE UNIQUE INDEX `user_organizations_unique` ON `user_organizations` (`tenant_id`,`user_id`,`organization_id`);--> statement-breakpoint
|
|
447
|
+
CREATE INDEX `idx_user_organizations_tenant_id` ON `user_organizations` (`tenant_id`);--> statement-breakpoint
|
|
448
|
+
CREATE INDEX `idx_user_organizations_user_id` ON `user_organizations` (`user_id`);--> statement-breakpoint
|
|
449
|
+
CREATE INDEX `idx_user_organizations_organization_id` ON `user_organizations` (`organization_id`);--> statement-breakpoint
|
|
450
|
+
CREATE TABLE `resource_servers` (
|
|
451
|
+
`id` text(21) NOT NULL,
|
|
452
|
+
`tenant_id` text(191) NOT NULL,
|
|
453
|
+
`identifier` text(191) NOT NULL,
|
|
454
|
+
`name` text(255) NOT NULL,
|
|
455
|
+
`scopes` text(4096),
|
|
456
|
+
`signing_alg` text(64),
|
|
457
|
+
`signing_secret` text(2048),
|
|
458
|
+
`token_lifetime` integer,
|
|
459
|
+
`token_lifetime_for_web` integer,
|
|
460
|
+
`skip_consent_for_verifiable_first_party_clients` integer,
|
|
461
|
+
`allow_offline_access` integer,
|
|
462
|
+
`verification_key` text(4096),
|
|
463
|
+
`options` text(4096),
|
|
464
|
+
`created_at` text(35) NOT NULL,
|
|
465
|
+
`updated_at` text(35) NOT NULL,
|
|
466
|
+
PRIMARY KEY(`tenant_id`, `id`)
|
|
467
|
+
);
|
|
468
|
+
--> statement-breakpoint
|
|
469
|
+
CREATE TABLE `role_permissions` (
|
|
470
|
+
`tenant_id` text(191) NOT NULL,
|
|
471
|
+
`role_id` text(21) NOT NULL,
|
|
472
|
+
`resource_server_identifier` text(191) NOT NULL,
|
|
473
|
+
`permission_name` text(191) NOT NULL,
|
|
474
|
+
`created_at` text(35) NOT NULL,
|
|
475
|
+
PRIMARY KEY(`tenant_id`, `role_id`, `resource_server_identifier`, `permission_name`)
|
|
476
|
+
);
|
|
477
|
+
--> statement-breakpoint
|
|
478
|
+
CREATE INDEX `role_permissions_role_fk` ON `role_permissions` (`tenant_id`,`role_id`);--> statement-breakpoint
|
|
479
|
+
CREATE INDEX `role_permissions_permission_fk` ON `role_permissions` (`tenant_id`,`resource_server_identifier`,`permission_name`);--> statement-breakpoint
|
|
480
|
+
CREATE TABLE `roles` (
|
|
481
|
+
`id` text(21) NOT NULL,
|
|
482
|
+
`tenant_id` text(191) NOT NULL,
|
|
483
|
+
`name` text(50) NOT NULL,
|
|
484
|
+
`description` text(255),
|
|
485
|
+
`created_at` text(35) NOT NULL,
|
|
486
|
+
`updated_at` text(35) NOT NULL,
|
|
487
|
+
PRIMARY KEY(`tenant_id`, `id`)
|
|
488
|
+
);
|
|
489
|
+
--> statement-breakpoint
|
|
490
|
+
CREATE TABLE `user_permissions` (
|
|
491
|
+
`tenant_id` text(191) NOT NULL,
|
|
492
|
+
`user_id` text(191) NOT NULL,
|
|
493
|
+
`resource_server_identifier` text(21) NOT NULL,
|
|
494
|
+
`permission_name` text(191) NOT NULL,
|
|
495
|
+
`organization_id` text(21) DEFAULT '' NOT NULL,
|
|
496
|
+
`created_at` text(35) NOT NULL,
|
|
497
|
+
PRIMARY KEY(`tenant_id`, `user_id`, `resource_server_identifier`, `permission_name`, `organization_id`)
|
|
498
|
+
);
|
|
499
|
+
--> statement-breakpoint
|
|
500
|
+
CREATE INDEX `user_permissions_user_fk` ON `user_permissions` (`tenant_id`,`user_id`);--> statement-breakpoint
|
|
501
|
+
CREATE INDEX `user_permissions_permission_fk` ON `user_permissions` (`tenant_id`,`resource_server_identifier`,`permission_name`);--> statement-breakpoint
|
|
502
|
+
CREATE INDEX `user_permissions_organization_fk` ON `user_permissions` (`organization_id`);--> statement-breakpoint
|
|
503
|
+
CREATE TABLE `user_roles` (
|
|
504
|
+
`tenant_id` text(191) NOT NULL,
|
|
505
|
+
`user_id` text(191) NOT NULL,
|
|
506
|
+
`role_id` text(21) NOT NULL,
|
|
507
|
+
`organization_id` text(191) DEFAULT '' NOT NULL,
|
|
508
|
+
`created_at` text(35) NOT NULL,
|
|
509
|
+
PRIMARY KEY(`tenant_id`, `user_id`, `role_id`, `organization_id`)
|
|
510
|
+
);
|
|
511
|
+
--> statement-breakpoint
|
|
512
|
+
CREATE INDEX `user_roles_user_fk` ON `user_roles` (`tenant_id`,`user_id`);--> statement-breakpoint
|
|
513
|
+
CREATE INDEX `user_roles_role_fk` ON `user_roles` (`tenant_id`,`role_id`);--> statement-breakpoint
|
|
514
|
+
CREATE INDEX `user_roles_organization_fk` ON `user_roles` (`organization_id`);--> statement-breakpoint
|
|
515
|
+
CREATE TABLE `branding` (
|
|
516
|
+
`tenant_id` text(255) PRIMARY KEY NOT NULL,
|
|
517
|
+
`logo_url` text(512),
|
|
518
|
+
`favicon_url` text(512),
|
|
519
|
+
`font_url` text(512),
|
|
520
|
+
`colors_primary` text(8),
|
|
521
|
+
`colors_page_background_type` text(32),
|
|
522
|
+
`colors_page_background_start` text(8),
|
|
523
|
+
`colors_page_background_end` text(8),
|
|
524
|
+
`colors_page_background_angle_dev` integer,
|
|
525
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
526
|
+
);
|
|
527
|
+
--> statement-breakpoint
|
|
528
|
+
CREATE TABLE `email_providers` (
|
|
529
|
+
`tenant_id` text(255) PRIMARY KEY NOT NULL,
|
|
530
|
+
`name` text(255) NOT NULL,
|
|
531
|
+
`enabled` integer NOT NULL,
|
|
532
|
+
`default_from_address` text(255),
|
|
533
|
+
`credentials` text(2048) DEFAULT '{}' NOT NULL,
|
|
534
|
+
`settings` text(2048) DEFAULT '{}' NOT NULL,
|
|
535
|
+
`created_at` text(29) NOT NULL,
|
|
536
|
+
`updated_at` text(29) NOT NULL
|
|
537
|
+
);
|
|
538
|
+
--> statement-breakpoint
|
|
539
|
+
CREATE TABLE `flows` (
|
|
540
|
+
`id` text(21) PRIMARY KEY NOT NULL,
|
|
541
|
+
`tenant_id` text(191) NOT NULL,
|
|
542
|
+
`name` text(150) NOT NULL,
|
|
543
|
+
`actions` text,
|
|
544
|
+
`created_at` text(35) NOT NULL,
|
|
545
|
+
`updated_at` text(35) NOT NULL
|
|
546
|
+
);
|
|
547
|
+
--> statement-breakpoint
|
|
548
|
+
CREATE INDEX `flows_tenant_id_idx` ON `flows` (`tenant_id`);--> statement-breakpoint
|
|
549
|
+
CREATE TABLE `forms` (
|
|
550
|
+
`id` text(255) PRIMARY KEY NOT NULL,
|
|
551
|
+
`name` text(255) NOT NULL,
|
|
552
|
+
`tenant_id` text(255) NOT NULL,
|
|
553
|
+
`messages` text(255),
|
|
554
|
+
`languages` text(255),
|
|
555
|
+
`translations` text(4096),
|
|
556
|
+
`nodes` text(4096),
|
|
557
|
+
`start` text(255),
|
|
558
|
+
`ending` text(255),
|
|
559
|
+
`style` text(1042),
|
|
560
|
+
`created_at` text(255) NOT NULL,
|
|
561
|
+
`updated_at` text(255) NOT NULL
|
|
562
|
+
);
|
|
563
|
+
--> statement-breakpoint
|
|
564
|
+
CREATE INDEX `forms_tenant_id_idx` ON `forms` (`tenant_id`);--> statement-breakpoint
|
|
565
|
+
CREATE TABLE `hooks` (
|
|
566
|
+
`hook_id` text(255) PRIMARY KEY NOT NULL,
|
|
567
|
+
`tenant_id` text(255) NOT NULL,
|
|
568
|
+
`url` text(512) NOT NULL,
|
|
569
|
+
`trigger_id` text(255) NOT NULL,
|
|
570
|
+
`enabled` integer NOT NULL,
|
|
571
|
+
`created_at` text(255) NOT NULL,
|
|
572
|
+
`updated_at` text(255) NOT NULL,
|
|
573
|
+
`synchronous` integer DEFAULT false NOT NULL,
|
|
574
|
+
`priority` integer,
|
|
575
|
+
`form_id` text,
|
|
576
|
+
`url_tmp` text(512),
|
|
577
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
578
|
+
);
|
|
579
|
+
--> statement-breakpoint
|
|
580
|
+
CREATE TABLE `keys` (
|
|
581
|
+
`kid` text(255) PRIMARY KEY NOT NULL,
|
|
582
|
+
`tenant_id` text(255),
|
|
583
|
+
`created_at` text(255) NOT NULL,
|
|
584
|
+
`revoked_at` text(255),
|
|
585
|
+
`cert` text(4096),
|
|
586
|
+
`pkcs7` text(4096),
|
|
587
|
+
`fingerprint` text(256),
|
|
588
|
+
`thumbprint` text(256),
|
|
589
|
+
`current_since` text(256),
|
|
590
|
+
`current_until` text(256),
|
|
591
|
+
`type` text(50) DEFAULT 'jwt_signing' NOT NULL,
|
|
592
|
+
`connection` text(255),
|
|
593
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
594
|
+
FOREIGN KEY (`connection`) REFERENCES `connections`(`id`) ON UPDATE no action ON DELETE cascade
|
|
595
|
+
);
|
|
596
|
+
--> statement-breakpoint
|
|
597
|
+
CREATE TABLE `prompt_settings` (
|
|
598
|
+
`tenant_id` text(64) PRIMARY KEY NOT NULL,
|
|
599
|
+
`universal_login_experience` text(16) DEFAULT 'new' NOT NULL,
|
|
600
|
+
`identifier_first` integer DEFAULT true NOT NULL,
|
|
601
|
+
`password_first` integer DEFAULT false NOT NULL,
|
|
602
|
+
`webauthn_platform_first_factor` integer DEFAULT false NOT NULL
|
|
603
|
+
);
|
|
604
|
+
--> statement-breakpoint
|
|
605
|
+
CREATE TABLE `themes` (
|
|
606
|
+
`tenant_id` text(255) NOT NULL,
|
|
607
|
+
`themeId` text(255) NOT NULL,
|
|
608
|
+
`displayName` text(255) NOT NULL,
|
|
609
|
+
`colors_primary_button_label` text(24) NOT NULL,
|
|
610
|
+
`colors_primary_button` text(24) NOT NULL,
|
|
611
|
+
`colors_secondary_button_border` text(24) NOT NULL,
|
|
612
|
+
`colors_secondary_button_label` text(24) NOT NULL,
|
|
613
|
+
`colors_base_focus_color` text(24) NOT NULL,
|
|
614
|
+
`colors_base_hover_color` text(24) NOT NULL,
|
|
615
|
+
`colors_body_text` text(24) NOT NULL,
|
|
616
|
+
`colors_captcha_widget_theme` text(24) NOT NULL,
|
|
617
|
+
`colors_error` text(24) NOT NULL,
|
|
618
|
+
`colors_header` text(24) NOT NULL,
|
|
619
|
+
`colors_icons` text(24) NOT NULL,
|
|
620
|
+
`colors_input_background` text(24) NOT NULL,
|
|
621
|
+
`colors_input_border` text(24) NOT NULL,
|
|
622
|
+
`colors_input_filled_text` text(24) NOT NULL,
|
|
623
|
+
`colors_input_labels_placeholders` text(24) NOT NULL,
|
|
624
|
+
`colors_links_focused_components` text(24) NOT NULL,
|
|
625
|
+
`colors_success` text(24) NOT NULL,
|
|
626
|
+
`colors_widget_background` text(24) NOT NULL,
|
|
627
|
+
`colors_widget_border` text(24) NOT NULL,
|
|
628
|
+
`borders_button_border_radius` integer NOT NULL,
|
|
629
|
+
`borders_button_border_weight` integer NOT NULL,
|
|
630
|
+
`borders_buttons_style` text(24) NOT NULL,
|
|
631
|
+
`borders_input_border_radius` integer NOT NULL,
|
|
632
|
+
`borders_input_border_weight` integer NOT NULL,
|
|
633
|
+
`borders_inputs_style` text(24) NOT NULL,
|
|
634
|
+
`borders_show_widget_shadow` integer NOT NULL,
|
|
635
|
+
`borders_widget_border_weight` integer NOT NULL,
|
|
636
|
+
`borders_widget_corner_radius` integer NOT NULL,
|
|
637
|
+
`fonts_body_text_bold` integer NOT NULL,
|
|
638
|
+
`fonts_body_text_size` integer NOT NULL,
|
|
639
|
+
`fonts_buttons_text_bold` integer NOT NULL,
|
|
640
|
+
`fonts_buttons_text_size` integer NOT NULL,
|
|
641
|
+
`fonts_font_url` text(255) NOT NULL,
|
|
642
|
+
`fonts_input_labels_bold` integer NOT NULL,
|
|
643
|
+
`fonts_input_labels_size` integer NOT NULL,
|
|
644
|
+
`fonts_links_bold` integer NOT NULL,
|
|
645
|
+
`fonts_links_size` integer NOT NULL,
|
|
646
|
+
`fonts_links_style` text(24) NOT NULL,
|
|
647
|
+
`fonts_reference_text_size` integer NOT NULL,
|
|
648
|
+
`fonts_subtitle_bold` integer NOT NULL,
|
|
649
|
+
`fonts_subtitle_size` integer NOT NULL,
|
|
650
|
+
`fonts_title_bold` integer NOT NULL,
|
|
651
|
+
`fonts_title_size` integer NOT NULL,
|
|
652
|
+
`page_background_background_color` text(24) NOT NULL,
|
|
653
|
+
`page_background_background_image_url` text(255) NOT NULL,
|
|
654
|
+
`page_background_page_layout` text(24) NOT NULL,
|
|
655
|
+
`widget_header_text_alignment` text(24) NOT NULL,
|
|
656
|
+
`widget_logo_height` integer NOT NULL,
|
|
657
|
+
`widget_logo_position` text(24) NOT NULL,
|
|
658
|
+
`widget_logo_url` text(255) NOT NULL,
|
|
659
|
+
`widget_social_buttons_layout` text(24) NOT NULL,
|
|
660
|
+
`created_at` text(35) NOT NULL,
|
|
661
|
+
`updated_at` text(35) NOT NULL,
|
|
662
|
+
PRIMARY KEY(`tenant_id`, `themeId`),
|
|
663
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
664
|
+
);
|
|
665
|
+
--> statement-breakpoint
|
|
666
|
+
CREATE INDEX `themes_tenant_id_idx` ON `themes` (`tenant_id`);--> statement-breakpoint
|
|
667
|
+
CREATE TABLE `logs` (
|
|
668
|
+
`log_id` text(21) PRIMARY KEY NOT NULL,
|
|
669
|
+
`category` text(255),
|
|
670
|
+
`tenant_id` text(64),
|
|
671
|
+
`user_id` text(64),
|
|
672
|
+
`ip` text(255),
|
|
673
|
+
`type` text(8) NOT NULL,
|
|
674
|
+
`date` text(25) NOT NULL,
|
|
675
|
+
`client_id` text(255),
|
|
676
|
+
`client_name` text(255),
|
|
677
|
+
`user_agent` text(255),
|
|
678
|
+
`description` text(255),
|
|
679
|
+
`details` text(2048),
|
|
680
|
+
`isMobile` integer,
|
|
681
|
+
`user_name` text(255),
|
|
682
|
+
`connection` text(255),
|
|
683
|
+
`connection_id` text(255),
|
|
684
|
+
`audience` text(255),
|
|
685
|
+
`scope` text(255),
|
|
686
|
+
`strategy` text(255),
|
|
687
|
+
`strategy_type` text(255),
|
|
688
|
+
`hostname` text(255),
|
|
689
|
+
`auth0_client` text(8192),
|
|
690
|
+
`session_connection` text(255),
|
|
691
|
+
`country_code` text(2),
|
|
692
|
+
`city_name` text(255),
|
|
693
|
+
`latitude` text(255),
|
|
694
|
+
`longitude` text(255),
|
|
695
|
+
`time_zone` text(255),
|
|
696
|
+
`continent_code` text(2)
|
|
697
|
+
);
|
|
698
|
+
--> statement-breakpoint
|
|
699
|
+
CREATE INDEX `logs_user_id` ON `logs` (`user_id`);--> statement-breakpoint
|
|
700
|
+
CREATE INDEX `logs_tenant_id` ON `logs` (`tenant_id`);--> statement-breakpoint
|
|
701
|
+
CREATE INDEX `logs_date` ON `logs` (`date`);--> statement-breakpoint
|
|
702
|
+
CREATE INDEX `IDX_logs_tenant_date_type_user` ON `logs` (`tenant_id`,`date`,`type`,`user_id`);--> statement-breakpoint
|
|
703
|
+
CREATE TABLE `applications` (
|
|
704
|
+
`id` text(255) PRIMARY KEY NOT NULL,
|
|
705
|
+
`tenant_id` text(255) NOT NULL,
|
|
706
|
+
`name` text(255) NOT NULL,
|
|
707
|
+
`client_secret` text(255),
|
|
708
|
+
`allowed_logout_urls` text(255),
|
|
709
|
+
`authentication_settings` text(255),
|
|
710
|
+
`addons` text(4096) DEFAULT '{}' NOT NULL,
|
|
711
|
+
`callbacks` text(1024) DEFAULT '[]' NOT NULL,
|
|
712
|
+
`allowed_origins` text(1024) DEFAULT '[]' NOT NULL,
|
|
713
|
+
`web_origins` text(1024) DEFAULT '[]' NOT NULL,
|
|
714
|
+
`allowed_clients` text(1024) DEFAULT '[]' NOT NULL,
|
|
715
|
+
`options_kid` text(32),
|
|
716
|
+
`options_team_id` text(32),
|
|
717
|
+
`options_client_id` text(128),
|
|
718
|
+
`options_client_secret` text(255),
|
|
719
|
+
`options_scope` text(255),
|
|
720
|
+
`options_realms` text(255),
|
|
721
|
+
`options_app_secret` text(1024),
|
|
722
|
+
`email_validation` text(255),
|
|
723
|
+
`disable_sign_ups` text,
|
|
724
|
+
`created_at` text(255) NOT NULL,
|
|
725
|
+
`updated_at` text(255) NOT NULL,
|
|
726
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
727
|
+
);
|
|
728
|
+
--> statement-breakpoint
|
|
729
|
+
CREATE TABLE `logins` (
|
|
730
|
+
`login_id` text(255) PRIMARY KEY NOT NULL,
|
|
731
|
+
`tenant_id` text(255) NOT NULL,
|
|
732
|
+
`authParams_client_id` text(255) NOT NULL,
|
|
733
|
+
`authParams_vendor_id` text(255),
|
|
734
|
+
`authParams_username` text(255),
|
|
735
|
+
`authParams_response_type` text(255),
|
|
736
|
+
`authParams_response_mode` text(255),
|
|
737
|
+
`authParams_audience` text(255),
|
|
738
|
+
`authParams_scope` text(511),
|
|
739
|
+
`authParams_state` text(511),
|
|
740
|
+
`authParams_code_challenge_method` text(256),
|
|
741
|
+
`authParams_code_challenge` text(256),
|
|
742
|
+
`authParams_redirect_uri` text(256),
|
|
743
|
+
`authParams_organization` text(256),
|
|
744
|
+
`authorization_url` text(1024),
|
|
745
|
+
`created_at` text(255) NOT NULL,
|
|
746
|
+
`updated_at` text(255) NOT NULL,
|
|
747
|
+
`expires_at` text(255) NOT NULL,
|
|
748
|
+
`ip` text(255),
|
|
749
|
+
`useragent` text(512),
|
|
750
|
+
`auth0Client` text(256),
|
|
751
|
+
`authParams_nonce` text(255),
|
|
752
|
+
`authParams_ui_locales` text(32),
|
|
753
|
+
`authParams_prompt` text(16),
|
|
754
|
+
`authParams_act_as` text(255),
|
|
755
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
756
|
+
);
|
|
757
|
+
--> statement-breakpoint
|
|
758
|
+
CREATE TABLE `members` (
|
|
759
|
+
`id` text(255) PRIMARY KEY NOT NULL,
|
|
760
|
+
`tenant_id` text(255) NOT NULL,
|
|
761
|
+
`sub` text(255),
|
|
762
|
+
`email` text(255),
|
|
763
|
+
`name` text(255),
|
|
764
|
+
`status` text(255),
|
|
765
|
+
`role` text(255),
|
|
766
|
+
`picture` text(2083),
|
|
767
|
+
`created_at` text(255) NOT NULL,
|
|
768
|
+
`updated_at` text(255) NOT NULL,
|
|
769
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
770
|
+
);
|
|
771
|
+
--> statement-breakpoint
|
|
772
|
+
CREATE TABLE `migrations` (
|
|
773
|
+
`id` text(255) PRIMARY KEY NOT NULL,
|
|
774
|
+
`tenant_id` text(255) NOT NULL,
|
|
775
|
+
`provider` text(255),
|
|
776
|
+
`client_id` text(255),
|
|
777
|
+
`origin` text(255),
|
|
778
|
+
`domain` text(255),
|
|
779
|
+
`created_at` text(255) NOT NULL,
|
|
780
|
+
`updated_at` text(255) NOT NULL,
|
|
781
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
782
|
+
);
|