Skip to content

Commit

Permalink
Merge pull request #134 from doctolib/fix_create_table_args
Browse files Browse the repository at this point in the history
Fix args bug for create_table
  • Loading branch information
CharlesDelannoy authored Dec 12, 2023
2 parents cc4505a + 26c4ec8 commit f2595ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/safe-pg-migrations/plugins/statement_insurer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def add_foreign_key(from_table, to_table, **options)
validate_foreign_key from_table, sub_options.present? ? nil : to_table, **sub_options
end

def create_table(*)
def create_table(table_name, **options)
super do |td|
yield td if block_given?
td.indexes.map! do |key, index_options|
Expand Down
2 changes: 1 addition & 1 deletion test/StatementInsurer/statement_insurer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def test_create_table
@migration =
Class.new(ActiveRecord::Migration::Current) do
def change
create_table(:users) do |t|
create_table(:users, primary_key: nil) do |t|
t.string :email
t.references :user, foreign_key: true
end
Expand Down

0 comments on commit f2595ac

Please sign in to comment.