SQL
CREATE TABLE "type_availability_policy_attachment" (
"scopeId" varchar(36) NOT NULL,
"policyId" varchar(36) NOT NULL,
"priority" integer NOT NULL,
"isFloor" boolean NOT NULL DEFAULT (false),
"createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')),
"updatedAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')),
CONSTRAINT "FK_118709fc9fe21d3406f81665a53" FOREIGN KEY ("scopeId") REFERENCES "type_availability_policy_scope" ("id") ON DELETE CASCADE,
CONSTRAINT "FK_674705e4c8a3d3eb0736f8e8eee" FOREIGN KEY ("policyId") REFERENCES "type_availability_policy" ("id") ON DELETE RESTRICT,
PRIMARY KEY ("scopeId", "policyId")
)
Columns
| Column | Data type | Allow null | Primary key | Actions |
|---|---|---|---|---|
scopeId |
varchar(36) |
✓ | Rename | Drop | |
policyId |
varchar(36) |
✓ | Rename | Drop | |
priority |
INTEGER |
Rename | Drop | ||
isFloor |
boolean |
Rename | Drop | ||
createdAt |
datetime(3) |
Rename | Drop | ||
updatedAt |
datetime(3) |
Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
policyId |
type_availability_policy.id |
scopeId |
type_availability_policy_scope.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| IDX_674705e4c8a3d3eb0736f8e8ee |
policyId
|
SQL | Drop | |
| sqlite_autoindex_type_availability_policy_attachment_1 |
|
✓ | SQL | Drop |
| uq_type_availability_attachment_slot |
|
✓ | SQL | Drop |