SQL
CREATE TABLE "core_formatted_messages" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"raingull_id" char(32) NOT NULL,
"status" varchar(20) NOT NULL,
"formatted_payload" text NOT NULL CHECK ((JSON_VALID("formatted_payload") OR "formatted_payload" IS NULL)),
"subject" varchar(255) NULL,
"sender" varchar(255) NULL,
"recipient" varchar(255) NULL,
"error_message" text NULL,
"created_at" datetime NOT NULL,
"updated_at" datetime NOT NULL,
"sent_at" datetime NULL,
"message_id" bigint NOT NULL REFERENCES "core_messages" ("id") DEFERRABLE INITIALLY DEFERRED,
"service_id" bigint NOT NULL REFERENCES "core_services" ("id") DEFERRABLE INITIALLY DEFERRED
)
Columns
| Column | Data type | Allow null | Primary key | Actions |
|---|---|---|---|---|
id |
INTEGER |
✓ | Rename | Drop | |
raingull_id |
char(32) |
Rename | Drop | ||
status |
varchar(20) |
Rename | Drop | ||
formatted_payload |
TEXT |
Rename | Drop | ||
subject |
varchar(255) |
✓ | Rename | Drop | |
sender |
varchar(255) |
✓ | Rename | Drop | |
recipient |
varchar(255) |
✓ | Rename | Drop | |
error_message |
TEXT |
✓ | Rename | Drop | |
created_at |
datetime |
Rename | Drop | ||
updated_at |
datetime |
Rename | Drop | ||
sent_at |
datetime |
✓ | Rename | Drop | |
message_id |
bigint |
Rename | Drop | ||
service_id |
bigint |
Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
service_id |
core_services.id |
message_id |
core_messages.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| core_format_raingul_1e4a64_idx |
|
SQL | Drop | |
| core_format_status_b1b52a_idx |
|
SQL | Drop | |
| core_formatted_messages_created_at_bbf9b97c |
created_at
|
SQL | Drop | |
| core_formatted_messages_message_id_324f4cc3 |
message_id
|
SQL | Drop | |
| core_formatted_messages_raingull_id_2e3dffe3 |
raingull_id
|
SQL | Drop | |
| core_formatted_messages_service_id_2e9ac34b |
service_id
|
SQL | Drop | |
| core_formatted_messages_status_53913d68 |
status
|
SQL | Drop |