Skip to content

Commit 9fec03d

Browse files
committed
feat(github_hooks): add zebra migrations
1 parent f89919a commit 9fec03d

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddExpiresAtToJobs < ActiveRecord::Migration[6.1]
2+
def change
3+
add_column :jobs, :expires_at, :datetime
4+
end
5+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class AddExpiresCreatedIndexAtJobsTable < ActiveRecord::Migration[6.1]
2+
disable_ddl_transaction!
3+
4+
def change
5+
add_index :jobs,
6+
%i[expires_at created_at],
7+
name: "index_jobs_on_expires_created_not_null",
8+
algorithm: :concurrently,
9+
where: "expires_at IS NOT NULL"
10+
end
11+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class AddOrganizationCreatedIndexAtJobsTable < ActiveRecord::Migration[6.1]
2+
disable_ddl_transaction!
3+
4+
def change
5+
add_index :jobs,
6+
%i[organization_id created_at],
7+
name: "index_jobs_on_organization_created_expires_is_null",
8+
algorithm: :concurrently,
9+
where: "expires_at IS NULL"
10+
end
11+
end

0 commit comments

Comments
 (0)