Files
story/migrations/000062_operator_phone_login.up.sql
T
Codex Local bf1233d5df
ci / verify (push) Canceled after 0s
feat: expand companion platform, device controls, and memoir workflows
Add customer and operator login, BLE provisioning, device fleet controls, call memory, memoir generation, and refreshed family and maintenance portals. Include API contracts, migrations, firmware sources, tests, assets, and deployment documentation.
2026-10-08 10:06:44 +08:00

10 lines
694 B
PL/PgSQL

BEGIN;
CREATE TABLE operator_login_session (LIKE customer_login_session INCLUDING ALL);
CREATE TABLE operator_phone_credential (LIKE customer_phone_credential INCLUDING ALL);
CREATE TABLE operator_sms_challenge (LIKE customer_sms_challenge INCLUDING ALL);
ALTER TABLE operator_sms_challenge ADD FOREIGN KEY (session_hash) REFERENCES operator_login_session(token_hash) ON DELETE CASCADE;
CREATE TABLE operator_account_session (LIKE onboarding_account_session INCLUDING ALL);
ALTER TABLE operator_account_session ADD FOREIGN KEY (user_id) REFERENCES user_account(id);
ALTER TABLE operator_account_session ADD FOREIGN KEY (phone_digest) REFERENCES operator_phone_credential(phone_digest);
COMMIT;