|
10 | 10 | # |
11 | 11 | # It's strongly recommended that you check this file into your version control system. |
12 | 12 |
|
13 | | -ActiveRecord::Schema[7.1].define(version: 2024_08_21_003007) do |
| 13 | +ActiveRecord::Schema[7.2].define(version: 2024_08_21_003007) do |
14 | 14 | create_table "api_clients", force: :cascade do |t| |
15 | 15 | t.text "permissions", limit: 65535 |
16 | 16 | t.integer "creator_id", limit: 4 |
17 | | - t.datetime "created_at", null: false |
18 | | - t.datetime "updated_at", null: false |
| 17 | + t.datetime "created_at", precision: nil, null: false |
| 18 | + t.datetime "updated_at", precision: nil, null: false |
19 | 19 | t.string "name", limit: 255, default: "" |
20 | 20 | t.integer "stack_id", limit: 4 |
21 | 21 | t.index ["creator_id"], name: "index_api_clients_on_creator_id" |
|
30 | 30 | t.string "title", limit: 1024 |
31 | 31 | t.string "details_url" |
32 | 32 | t.string "html_url" |
33 | | - t.datetime "created_at", null: false |
34 | | - t.datetime "updated_at", null: false |
35 | | - t.datetime "github_updated_at" |
| 33 | + t.datetime "created_at", precision: nil, null: false |
| 34 | + t.datetime "updated_at", precision: nil, null: false |
| 35 | + t.datetime "github_updated_at", precision: nil |
36 | 36 | t.index ["commit_id"], name: "index_check_runs_on_commit_id" |
37 | 37 | t.index ["github_id", "commit_id"], name: "index_check_runs_on_github_id_and_commit_id", unique: true |
38 | 38 | t.index ["stack_id"], name: "index_check_runs_on_stack_id" |
|
43 | 43 | t.string "status" |
44 | 44 | t.bigint "github_id" |
45 | 45 | t.string "api_url" |
46 | | - t.datetime "created_at", null: false |
47 | | - t.datetime "updated_at", null: false |
| 46 | + t.datetime "created_at", precision: nil, null: false |
| 47 | + t.datetime "updated_at", precision: nil, null: false |
48 | 48 | t.index ["commit_deployment_id"], name: "index_commit_deployment_statuses_on_commit_deployment_id" |
49 | 49 | end |
50 | 50 |
|
|
53 | 53 | t.integer "task_id" |
54 | 54 | t.integer "github_id" |
55 | 55 | t.string "api_url" |
56 | | - t.datetime "created_at", null: false |
57 | | - t.datetime "updated_at", null: false |
| 56 | + t.datetime "created_at", precision: nil, null: false |
| 57 | + t.datetime "updated_at", precision: nil, null: false |
58 | 58 | t.string "sha", limit: 40 |
59 | 59 | t.index ["commit_id", "task_id"], name: "index_commit_deployments_on_commit_id_and_task_id", unique: true |
60 | 60 | t.index ["task_id"], name: "index_commit_deployments_on_task_id" |
|
66 | 66 | t.integer "committer_id", limit: 4 |
67 | 67 | t.string "sha", limit: 40, null: false |
68 | 68 | t.text "message", limit: 65535, null: false |
69 | | - t.datetime "created_at" |
70 | | - t.datetime "updated_at" |
| 69 | + t.datetime "created_at", precision: nil |
| 70 | + t.datetime "updated_at", precision: nil |
71 | 71 | t.boolean "detached", default: false, null: false |
72 | | - t.datetime "authored_at", null: false |
73 | | - t.datetime "committed_at", null: false |
| 72 | + t.datetime "authored_at", precision: nil, null: false |
| 73 | + t.datetime "committed_at", precision: nil, null: false |
74 | 74 | t.integer "additions", limit: 4 |
75 | 75 | t.integer "deletions", limit: 4 |
76 | 76 | t.integer "pull_request_number" |
|
116 | 116 |
|
117 | 117 | create_table "deliveries", force: :cascade do |t| |
118 | 118 | t.integer "hook_id", limit: 4, null: false |
119 | | - t.string "status", limit: 50, default: "pending", null: false |
| 119 | + t.string "status", limit: 50 |
120 | 120 | t.string "url", limit: 4096, null: false |
121 | 121 | t.string "content_type", limit: 255, null: false |
122 | | - t.string "event", limit: 50, null: false |
| 122 | + t.string "event", limit: 50 |
123 | 123 | t.text "payload", limit: 16777215, null: false |
124 | 124 | t.integer "response_code", limit: 4 |
125 | 125 | t.text "response_headers", limit: 65535 |
126 | 126 | t.text "response_body", limit: 65535 |
127 | | - t.datetime "delivered_at" |
128 | | - t.datetime "created_at", null: false |
129 | | - t.datetime "updated_at", null: false |
| 127 | + t.datetime "delivered_at", precision: nil |
| 128 | + t.datetime "created_at", precision: nil, null: false |
| 129 | + t.datetime "updated_at", precision: nil, null: false |
130 | 130 | t.index ["hook_id", "event", "status"], name: "index_deliveries_on_hook_id_and_event_and_status" |
131 | 131 | t.index ["hook_id", "status"], name: "index_deliveries_on_hook_id_and_status" |
132 | 132 | end |
|
135 | 135 | t.integer "stack_id", limit: 4 |
136 | 136 | t.integer "github_id", limit: 4 |
137 | 137 | t.string "event", limit: 50, null: false |
138 | | - t.datetime "created_at" |
139 | | - t.datetime "updated_at" |
| 138 | + t.datetime "created_at", precision: nil |
| 139 | + t.datetime "updated_at", precision: nil |
140 | 140 | t.string "secret", limit: 255 |
141 | 141 | t.string "api_url", limit: 255 |
142 | 142 | t.string "type", limit: 255 |
|
152 | 152 | t.string "secret", limit: 255 |
153 | 153 | t.string "events", limit: 255, default: "", null: false |
154 | 154 | t.boolean "insecure_ssl", default: false, null: false |
155 | | - t.datetime "created_at", null: false |
156 | | - t.datetime "updated_at", null: false |
| 155 | + t.datetime "created_at", precision: nil, null: false |
| 156 | + t.datetime "updated_at", precision: nil, null: false |
157 | 157 | t.index ["stack_id"], name: "index_hooks_on_stack_id" |
158 | 158 | end |
159 | 159 |
|
160 | 160 | create_table "memberships", force: :cascade do |t| |
161 | 161 | t.integer "team_id", limit: 4 |
162 | 162 | t.integer "user_id", limit: 4 |
163 | | - t.datetime "created_at", null: false |
164 | | - t.datetime "updated_at", null: false |
| 163 | + t.datetime "created_at", precision: nil, null: false |
| 164 | + t.datetime "updated_at", precision: nil, null: false |
165 | 165 | t.index ["team_id", "user_id"], name: "index_memberships_on_team_id_and_user_id", unique: true |
166 | 166 | t.index ["user_id"], name: "index_memberships_on_user_id" |
167 | 167 | end |
|
179 | 179 | t.integer "deletions", default: 0, null: false |
180 | 180 | t.string "merge_status", limit: 30, null: false |
181 | 181 | t.string "rejection_reason" |
182 | | - t.datetime "merge_requested_at", null: false |
| 182 | + t.datetime "merge_requested_at", precision: nil, null: false |
183 | 183 | t.integer "merge_requested_by_id" |
184 | | - t.datetime "created_at", null: false |
185 | | - t.datetime "updated_at", null: false |
| 184 | + t.datetime "created_at", precision: nil, null: false |
| 185 | + t.datetime "updated_at", precision: nil, null: false |
186 | 186 | t.string "branch" |
187 | | - t.datetime "revalidated_at" |
188 | | - t.datetime "merged_at" |
| 187 | + t.datetime "revalidated_at", precision: nil |
| 188 | + t.datetime "merged_at", precision: nil |
189 | 189 | t.string "base_ref", limit: 1024 |
190 | 190 | t.integer "base_commit_id" |
191 | 191 | t.index ["head_id"], name: "index_merge_requests_on_head_id" |
|
200 | 200 | create_table "output_chunks", force: :cascade do |t| |
201 | 201 | t.integer "task_id", limit: 4 |
202 | 202 | t.text "text", limit: 16777215 |
203 | | - t.datetime "created_at" |
204 | | - t.datetime "updated_at" |
| 203 | + t.datetime "created_at", precision: nil |
| 204 | + t.datetime "updated_at", precision: nil |
205 | 205 | t.index ["task_id"], name: "index_output_chunks_on_task_id" |
206 | 206 | end |
207 | 207 |
|
|
224 | 224 | t.integer "user_id" |
225 | 225 | t.text "labels" |
226 | 226 | t.integer "head_id" |
227 | | - t.datetime "created_at", precision: 6, null: false |
228 | | - t.datetime "updated_at", precision: 6, null: false |
| 227 | + t.datetime "created_at", null: false |
| 228 | + t.datetime "updated_at", null: false |
229 | 229 | t.index ["head_id"], name: "index_pull_requests_on_head_id" |
230 | 230 | t.index ["stack_id", "github_id"], name: "index_pull_requests_on_stack_id_and_github_id", unique: true |
231 | 231 | t.index ["stack_id", "number"], name: "index_pull_requests_on_stack_id_and_number", unique: true |
|
240 | 240 | t.string "description", limit: 1024 |
241 | 241 | t.string "target_url", limit: 1024 |
242 | 242 | t.bigint "github_id" |
243 | | - t.datetime "created_at", null: false |
244 | | - t.datetime "updated_at", null: false |
245 | | - t.index ["commit_id", "github_id"], name: "index_deploy_statuses_on_commit_id_and_github_id" |
246 | | - t.index ["stack_id", "commit_id"], name: "index_deploy_statuses_on_stack_id_and_commit_id" |
247 | | - t.index ["user_id"], name: "index_deploy_statuses_on_user_id" |
| 243 | + t.datetime "created_at", precision: nil, null: false |
| 244 | + t.datetime "updated_at", precision: nil, null: false |
| 245 | + t.index ["commit_id", "github_id"], name: "index_release_statuses_on_commit_id_and_github_id" |
| 246 | + t.index ["stack_id", "commit_id"], name: "index_release_statuses_on_stack_id_and_commit_id" |
| 247 | + t.index ["user_id"], name: "index_release_statuses_on_user_id" |
248 | 248 | end |
249 | 249 |
|
250 | 250 | create_table "repositories", force: :cascade do |t| |
251 | 251 | t.string "owner", limit: 39, null: false |
252 | 252 | t.string "name", limit: 100, null: false |
253 | | - t.datetime "created_at", precision: 6, null: false |
254 | | - t.datetime "updated_at", precision: 6, null: false |
| 253 | + t.datetime "created_at", null: false |
| 254 | + t.datetime "updated_at", null: false |
255 | 255 | t.boolean "review_stacks_enabled", default: false |
256 | 256 | t.string "provisioning_behavior", default: "allow_all" |
257 | 257 | t.string "provisioning_label_name" |
|
260 | 260 |
|
261 | 261 | create_table "stacks", force: :cascade do |t| |
262 | 262 | t.string "environment", limit: 50, default: "production", null: false |
263 | | - t.datetime "created_at" |
264 | | - t.datetime "updated_at" |
| 263 | + t.datetime "created_at", precision: nil |
| 264 | + t.datetime "updated_at", precision: nil |
265 | 265 | t.string "branch", limit: 255, null: false |
266 | 266 | t.string "deploy_url", limit: 255 |
267 | 267 | t.string "lock_reason", limit: 4096 |
|
271 | 271 | t.text "cached_deploy_spec", limit: 65535 |
272 | 272 | t.integer "lock_author_id", limit: 4 |
273 | 273 | t.boolean "ignore_ci" |
274 | | - t.datetime "inaccessible_since" |
| 274 | + t.datetime "inaccessible_since", precision: nil |
275 | 275 | t.integer "estimated_deploy_duration", default: 1, null: false |
276 | | - t.datetime "continuous_delivery_delayed_since" |
277 | | - t.datetime "locked_since" |
| 276 | + t.datetime "continuous_delivery_delayed_since", precision: nil |
| 277 | + t.datetime "locked_since", precision: nil |
278 | 278 | t.boolean "merge_queue_enabled", default: false, null: false |
279 | | - t.datetime "last_deployed_at" |
| 279 | + t.datetime "last_deployed_at", precision: nil |
280 | 280 | t.integer "repository_id", null: false |
281 | | - t.datetime "archived_since" |
| 281 | + t.datetime "archived_since", precision: nil |
282 | 282 | t.string "provision_status", default: "deprovisioned", null: false |
283 | 283 | t.string "type", default: "Shipit::Stack" |
284 | 284 | t.boolean "awaiting_provision", default: false, null: false |
|
296 | 296 | t.text "description", limit: 65535 |
297 | 297 | t.string "context", limit: 255, default: "default", null: false |
298 | 298 | t.integer "commit_id", limit: 4 |
299 | | - t.datetime "created_at" |
300 | | - t.datetime "updated_at" |
| 299 | + t.datetime "created_at", precision: nil |
| 300 | + t.datetime "updated_at", precision: nil |
301 | 301 | t.integer "stack_id", null: false |
302 | 302 | t.index ["commit_id"], name: "index_statuses_on_commit_id" |
303 | 303 | end |
|
307 | 307 | t.integer "since_commit_id", limit: 4 |
308 | 308 | t.integer "until_commit_id", limit: 4 |
309 | 309 | t.string "status", limit: 10, default: "pending", null: false |
310 | | - t.datetime "created_at" |
311 | | - t.datetime "updated_at" |
| 310 | + t.datetime "created_at", precision: nil |
| 311 | + t.datetime "updated_at", precision: nil |
312 | 312 | t.integer "user_id", limit: 4 |
313 | 313 | t.boolean "rolled_up", default: false, null: false |
314 | 314 | t.string "type", limit: 20 |
315 | 315 | t.integer "parent_id", limit: 4 |
316 | 316 | t.integer "additions", limit: 4, default: 0 |
317 | 317 | t.integer "deletions", limit: 4, default: 0 |
318 | 318 | t.text "definition", limit: 65535 |
319 | | - t.binary "gzip_output" |
| 319 | + t.binary "gzip_output", limit: 16777215 |
320 | 320 | t.boolean "rollback_once_aborted", default: false, null: false |
321 | 321 | t.text "env" |
322 | 322 | t.integer "confirmations", default: 0, null: false |
323 | 323 | t.boolean "allow_concurrency", default: false, null: false |
324 | | - t.datetime "started_at" |
325 | | - t.datetime "ended_at" |
| 324 | + t.datetime "started_at", precision: nil |
| 325 | + t.datetime "ended_at", precision: nil |
326 | 326 | t.boolean "ignored_safeties", default: false, null: false |
327 | 327 | t.integer "aborted_by_id" |
328 | 328 | t.integer "rollback_once_aborted_to_id" |
|
345 | 345 | t.string "slug", limit: 255 |
346 | 346 | t.string "name", limit: 255 |
347 | 347 | t.string "organization", limit: 39 |
348 | | - t.datetime "created_at", null: false |
349 | | - t.datetime "updated_at", null: false |
| 348 | + t.datetime "created_at", precision: nil, null: false |
| 349 | + t.datetime "updated_at", precision: nil, null: false |
350 | 350 | t.index ["organization", "slug"], name: "index_teams_on_organization_and_slug", unique: true |
351 | 351 | end |
352 | 352 |
|
|
356 | 356 | t.string "email", limit: 255 |
357 | 357 | t.string "login", limit: 39 |
358 | 358 | t.string "api_url", limit: 255 |
359 | | - t.datetime "created_at" |
360 | | - t.datetime "updated_at" |
| 359 | + t.datetime "created_at", precision: nil |
| 360 | + t.datetime "updated_at", precision: nil |
361 | 361 | t.string "avatar_url", limit: 255 |
362 | 362 | t.string "encrypted_github_access_token" |
363 | 363 | t.string "encrypted_github_access_token_iv" |
|
366 | 366 | t.index ["updated_at"], name: "index_users_on_updated_at" |
367 | 367 | end |
368 | 368 |
|
| 369 | + add_foreign_key "commit_deployment_statuses", "commit_deployments" |
| 370 | + add_foreign_key "commit_deployments", "commits" |
| 371 | + add_foreign_key "commit_deployments", "tasks" |
| 372 | + add_foreign_key "memberships", "teams" |
| 373 | + add_foreign_key "memberships", "users" |
| 374 | + add_foreign_key "merge_requests", "commits", column: "base_commit_id" |
| 375 | + add_foreign_key "merge_requests", "commits", column: "head_id" |
| 376 | + add_foreign_key "merge_requests", "stacks" |
| 377 | + add_foreign_key "merge_requests", "users", column: "merge_requested_by_id" |
369 | 378 | end |
0 commit comments