diff --git a/db/migrate/20210809155434_add_canonical_deploy_to_sites.rb b/db/migrate/20210809155434_add_canonical_deploy_to_sites.rb index 79b6af96..c1881336 100644 --- a/db/migrate/20210809155434_add_canonical_deploy_to_sites.rb +++ b/db/migrate/20210809155434_add_canonical_deploy_to_sites.rb @@ -22,8 +22,6 @@ class AddCanonicalDeployToSites < ActiveRecord::Migration[6.1] site.update_columns canonical_deploy_id: deploy.id end - - change_column :sites, :canonical_deploy_id, :bigint, null: false end def down diff --git a/test/factories/site.rb b/test/factories/site.rb index 7d91f841..3bfe4f35 100644 --- a/test/factories/site.rb +++ b/test/factories/site.rb @@ -13,7 +13,7 @@ FactoryBot.define do # Factory porque necesitamos que el sitio se genere solo. # # @see {https://github.com/thoughtbot/factory_bot/wiki/How-factory_bot-interacts-with-ActiveRecord} - site.deploys.build(type: 'DeployLocal') + site.canonical_deploy = site.deploys.build(type: 'DeployLocal') end end end