github.com/icyphox/x@v0.0.355-0.20220311094250-029bd783e8b8/popx/stub/migrations/transactional/20200519101057000005_create_recovery_addresses.sqlite3.up.sql (about)

     1  CREATE TABLE "identity_recovery_tokens" (
     2  "id" TEXT PRIMARY KEY,
     3  "token" TEXT NOT NULL,
     4  "used" bool NOT NULL DEFAULT 'false',
     5  "used_at" DATETIME,
     6  "identity_recovery_address_id" char(36) NOT NULL,
     7  "selfservice_recovery_request_id" char(36) NOT NULL,
     8  "created_at" DATETIME NOT NULL,
     9  "updated_at" DATETIME NOT NULL,
    10  FOREIGN KEY (identity_recovery_address_id) REFERENCES identity_recovery_addresses (id) ON DELETE cascade,
    11  FOREIGN KEY (selfservice_recovery_request_id) REFERENCES selfservice_recovery_requests (id) ON DELETE cascade
    12  )