@@ -102,57 +102,55 @@ table "permissions" {
102
102
columns = [column . playbook_id ]
103
103
ref_columns = [table . playbooks . column . id ]
104
104
on_update = NO_ACTION
105
- on_delete = NO_ACTION
105
+ on_delete = CASCADE
106
106
}
107
-
108
107
foreign_key "permissions_canary_id_fkey" {
109
108
columns = [column . canary_id ]
110
109
ref_columns = [table . canaries . column . id ]
111
110
on_update = NO_ACTION
112
- on_delete = NO_ACTION
111
+ on_delete = CASCADE
113
112
}
114
113
foreign_key "permissions_component_id_fkey" {
115
114
columns = [column . component_id ]
116
115
ref_columns = [table . components . column . id ]
117
116
on_update = NO_ACTION
118
- on_delete = NO_ACTION
117
+ on_delete = CASCADE
119
118
}
120
119
foreign_key "permissions_connection_id_fkey" {
121
120
columns = [column . connection_id ]
122
121
ref_columns = [table . connections . column . id ]
123
122
on_update = NO_ACTION
124
- on_delete = NO_ACTION
123
+ on_delete = CASCADE
125
124
}
126
125
foreign_key "permissions_config_id_fkey" {
127
126
columns = [column . config_id ]
128
127
ref_columns = [table . config_items . column . id ]
129
128
on_update = NO_ACTION
130
- on_delete = NO_ACTION
129
+ on_delete = CASCADE
131
130
}
132
131
foreign_key "permissions_created_by_fkey" {
133
132
columns = [column . created_by ]
134
133
ref_columns = [table . people . column . id ]
135
134
on_update = NO_ACTION
136
- on_delete = NO_ACTION
135
+ on_delete = CASCADE
137
136
}
138
137
foreign_key "permissions_notification_fkey" {
139
138
columns = [column . notification_id ]
140
139
ref_columns = [table . notifications . column . id ]
141
140
on_update = NO_ACTION
142
- on_delete = NO_ACTION
141
+ on_delete = CASCADE
143
142
}
144
143
foreign_key "permissions_person_fkey" {
145
144
columns = [column . person_id ]
146
145
ref_columns = [table . people . column . id ]
147
146
on_update = NO_ACTION
148
- on_delete = NO_ACTION
147
+ on_delete = CASCADE
149
148
}
150
-
151
149
foreign_key "permissions_team_fkey" {
152
150
columns = [column . team_id ]
153
151
ref_columns = [table . teams . column . id ]
154
152
on_update = NO_ACTION
155
- on_delete = NO_ACTION
153
+ on_delete = CASCADE
156
154
}
157
155
158
156
index "permissions_config_id_idx" {
0 commit comments