@authhero/drizzle 0.44.4 → 0.45.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.
@@ -281,6 +281,24 @@ CREATE TABLE `client_grants` (
281
281
  );
282
282
  --> statement-breakpoint
283
283
  CREATE INDEX `idx_client_grants_audience` ON `client_grants` (`audience`);--> statement-breakpoint
284
+ CREATE TABLE `client_registration_tokens` (
285
+ `id` text(255) PRIMARY KEY NOT NULL,
286
+ `tenant_id` text(191) NOT NULL,
287
+ `token_hash` text(64) NOT NULL,
288
+ `type` text(8) NOT NULL,
289
+ `client_id` text(191),
290
+ `sub` text(255),
291
+ `constraints` text,
292
+ `single_use` integer DEFAULT 0 NOT NULL,
293
+ `used_at_ts` integer,
294
+ `expires_at_ts` integer,
295
+ `created_at_ts` integer NOT NULL,
296
+ `revoked_at_ts` integer,
297
+ FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
298
+ );
299
+ --> statement-breakpoint
300
+ CREATE UNIQUE INDEX `idx_client_registration_tokens_hash` ON `client_registration_tokens` (`tenant_id`,`token_hash`);--> statement-breakpoint
301
+ CREATE INDEX `idx_client_registration_tokens_client` ON `client_registration_tokens` (`tenant_id`,`client_id`);--> statement-breakpoint
284
302
  CREATE TABLE `clients` (
285
303
  `client_id` text(191) NOT NULL,
286
304
  `tenant_id` text(191) NOT NULL,
@@ -336,29 +354,12 @@ CREATE TABLE `clients` (
336
354
  `owner_user_id` text(255),
337
355
  `registration_type` text(32),
338
356
  `registration_metadata` text,
357
+ `user_linking_mode` text(16),
339
358
  PRIMARY KEY(`tenant_id`, `client_id`),
340
359
  FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
341
360
  );
342
361
  --> statement-breakpoint
343
362
  CREATE INDEX `idx_clients_owner_user_id` ON `clients` (`tenant_id`,`owner_user_id`);--> statement-breakpoint
344
- CREATE TABLE `client_registration_tokens` (
345
- `id` text(255) PRIMARY KEY NOT NULL,
346
- `tenant_id` text(191) NOT NULL,
347
- `token_hash` text(64) NOT NULL,
348
- `type` text(8) NOT NULL,
349
- `client_id` text(191),
350
- `sub` text(255),
351
- `constraints` text,
352
- `single_use` integer DEFAULT 0 NOT NULL,
353
- `used_at_ts` integer,
354
- `expires_at_ts` integer,
355
- `created_at_ts` integer NOT NULL,
356
- `revoked_at_ts` integer,
357
- FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
358
- );
359
- --> statement-breakpoint
360
- CREATE INDEX `idx_client_registration_tokens_hash` ON `client_registration_tokens` (`tenant_id`,`token_hash`);--> statement-breakpoint
361
- CREATE INDEX `idx_client_registration_tokens_client` ON `client_registration_tokens` (`tenant_id`,`client_id`);--> statement-breakpoint
362
363
  CREATE TABLE `connections` (
363
364
  `id` text(255) NOT NULL,
364
365
  `tenant_id` text(191) NOT NULL,
@@ -565,6 +566,23 @@ CREATE TABLE `email_providers` (
565
566
  `updated_at` text(35) NOT NULL
566
567
  );
567
568
  --> statement-breakpoint
569
+ CREATE TABLE `email_templates` (
570
+ `tenant_id` text(191) NOT NULL,
571
+ `template` text(64) NOT NULL,
572
+ `body` text NOT NULL,
573
+ `from` text(255) NOT NULL,
574
+ `subject` text(255) NOT NULL,
575
+ `syntax` text(16) DEFAULT 'liquid' NOT NULL,
576
+ `result_url` text(2048),
577
+ `url_lifetime_in_seconds` integer,
578
+ `include_email_in_redirect` integer DEFAULT false NOT NULL,
579
+ `enabled` integer DEFAULT true NOT NULL,
580
+ `created_at` text(35) NOT NULL,
581
+ `updated_at` text(35) NOT NULL,
582
+ PRIMARY KEY(`tenant_id`, `template`),
583
+ FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
584
+ );
585
+ --> statement-breakpoint
568
586
  CREATE TABLE `flows` (
569
587
  `id` text(24) PRIMARY KEY NOT NULL,
570
588
  `tenant_id` text(191) NOT NULL,
@@ -617,6 +635,7 @@ CREATE TABLE `hooks` (
617
635
  `form_id` text(128),
618
636
  `template_id` text(64),
619
637
  `code_id` text(21),
638
+ `metadata` text,
620
639
  FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
621
640
  );
622
641
  --> statement-breakpoint