Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13421 from saraycp/extend_notifications_id_column…
…_capacity Extend notifications primary and foreign keys capacity
- Loading branch information
Showing
4 changed files
with
23 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/api/db/migrate/20221123163119_change_notifications_primary_and_foreign_keys_to_bigint.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class ChangeNotificationsPrimaryAndForeignKeysToBigint < ActiveRecord::Migration[7.0] | ||
def up | ||
# This migration blocks the table, we are running it during Maintenance Window. | ||
safety_assured do | ||
# Foreign key | ||
change_column :notified_projects, :notification_id, :bigint | ||
# Primary key | ||
change_column :notified_projects, :id, :bigint, auto_increment: true | ||
change_column :notifications, :id, :bigint, auto_increment: true | ||
end | ||
end | ||
|
||
def down | ||
raise ActiveRecord::IrreversibleMigration | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters