...

Text file src/github.com/ory/x/popx/stub/migrations/legacy/20191100000008_selfservice_verification.mysql.up.sql

Documentation: github.com/ory/x/popx/stub/migrations/legacy

     1CREATE TABLE `identity_verifiable_addresses` (
     2`id` char(36) NOT NULL,
     3PRIMARY KEY(`id`),
     4`code` VARCHAR (32) NOT NULL,
     5`status` VARCHAR (16) NOT NULL,
     6`via` VARCHAR (16) NOT NULL,
     7`verified` bool NOT NULL,
     8`value` VARCHAR (400) NOT NULL,
     9`verified_at` DATETIME,
    10`expires_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    11`identity_id` char(36) NOT NULL,
    12`created_at` DATETIME NOT NULL,
    13`updated_at` DATETIME NOT NULL,
    14FOREIGN KEY (`identity_id`) REFERENCES `identities` (`id`) ON DELETE cascade
    15) ENGINE=InnoDB;
    16CREATE UNIQUE INDEX `identity_verifiable_addresses_code_uq_idx` ON `identity_verifiable_addresses` (`code`);
    17CREATE INDEX `identity_verifiable_addresses_code_idx` ON `identity_verifiable_addresses` (`code`);
    18CREATE UNIQUE INDEX `identity_verifiable_addresses_status_via_uq_idx` ON `identity_verifiable_addresses` (`via`, `value`);
    19CREATE INDEX `identity_verifiable_addresses_status_via_idx` ON `identity_verifiable_addresses` (`via`, `value`);
    20CREATE TABLE `selfservice_verification_requests` (
    21`id` char(36) NOT NULL,
    22PRIMARY KEY(`id`),
    23`request_url` VARCHAR (2048) NOT NULL,
    24`issued_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    25`expires_at` DATETIME NOT NULL,
    26`form` JSON NOT NULL,
    27`via` VARCHAR (16) NOT NULL,
    28`csrf_token` VARCHAR (255) NOT NULL,
    29`success` bool NOT NULL,
    30`created_at` DATETIME NOT NULL,
    31`updated_at` DATETIME NOT NULL
    32) ENGINE=InnoDB;

View as plain text