diff --git a/database/migrations/phinx/20141105085836_form_attributes_relations.php b/database/migrations/phinx/20141105085836_form_attributes_relations.php index 602faee27f..ce25c3ba9a 100644 --- a/database/migrations/phinx/20141105085836_form_attributes_relations.php +++ b/database/migrations/phinx/20141105085836_form_attributes_relations.php @@ -38,7 +38,7 @@ public function up() } // drop the pivot table - $this->dropTable('form_groups_form_attributes'); + $this->table('form_groups_form_attributes')->drop()->save(); } /** diff --git a/database/migrations/phinx/20150323031520_rename_groups_to_stages.php b/database/migrations/phinx/20150323031520_rename_groups_to_stages.php index 3cead69605..ff3b10d7a3 100644 --- a/database/migrations/phinx/20150323031520_rename_groups_to_stages.php +++ b/database/migrations/phinx/20150323031520_rename_groups_to_stages.php @@ -7,15 +7,15 @@ class RenameGroupsToStages extends AbstractMigration public function up() { $this->table('form_groups') - ->rename('form_stages'); + ->rename('form_stages') + ->save(); - $attributes = $this->table('form_attributes'); - $attributes + $this->table('form_attributes') ->dropForeignKey('form_group_id') - ->renameColumn('form_group_id', 'form_stage_id') - ->update(); + ->save(); - $attributes + $this->table('form_attributes') + ->renameColumn('form_group_id', 'form_stage_id') ->addForeignKey('form_stage_id', 'form_stages', 'id', [ 'delete' => 'CASCADE', ]) diff --git a/database/migrations/phinx/20150612013637_remove_tasks.php b/database/migrations/phinx/20150612013637_remove_tasks.php index 7372531ee4..44172e942c 100644 --- a/database/migrations/phinx/20150612013637_remove_tasks.php +++ b/database/migrations/phinx/20150612013637_remove_tasks.php @@ -9,7 +9,7 @@ class RemoveTasks extends AbstractMigration */ public function up() { - $this->dropTable('tasks'); + $this->table('tasks')->drop()->save(); } /** diff --git a/database/migrations/phinx/20160202115439_add_permissions.php b/database/migrations/phinx/20160202115439_add_permissions.php index a8cd6c7b76..3e6f7ece5e 100644 --- a/database/migrations/phinx/20160202115439_add_permissions.php +++ b/database/migrations/phinx/20160202115439_add_permissions.php @@ -23,6 +23,6 @@ public function up() public function down() { - $this->dropTable('permissions'); + $this->table('permissions')->drop()->save(); } } diff --git a/database/migrations/phinx/20170311003829_create_webhook_table.php b/database/migrations/phinx/20170311003829_create_webhook_table.php index 503971fda1..7e9cbf4174 100644 --- a/database/migrations/phinx/20170311003829_create_webhook_table.php +++ b/database/migrations/phinx/20170311003829_create_webhook_table.php @@ -30,6 +30,6 @@ public function up() */ public function down() { - $this->dropTable('webhooks'); + $this->table('webhooks')->drop()->save(); } } diff --git a/database/migrations/phinx/20170311004159_create_webhook_job.php b/database/migrations/phinx/20170311004159_create_webhook_job.php index 41412b9d5c..e7708da0a6 100644 --- a/database/migrations/phinx/20170311004159_create_webhook_job.php +++ b/database/migrations/phinx/20170311004159_create_webhook_job.php @@ -25,6 +25,6 @@ public function up() */ public function down() { - $this->dropTable('webhook_job'); + $this->table('webhook_job')->drop()->save(); } } diff --git a/database/migrations/phinx/20170315231639_add_post_markdown_table.php b/database/migrations/phinx/20170315231639_add_post_markdown_table.php index 7710fd0a5f..7b324c279d 100644 --- a/database/migrations/phinx/20170315231639_add_post_markdown_table.php +++ b/database/migrations/phinx/20170315231639_add_post_markdown_table.php @@ -32,6 +32,6 @@ public function up() */ public function down() { - $this->dropTable('post_markdown'); + $this->table('post_markdown')->save(); } } diff --git a/database/migrations/phinx/20170330135806_add_api_key_table.php b/database/migrations/phinx/20170330135806_add_api_key_table.php index dc0d12cd9f..8e1ff725c7 100644 --- a/database/migrations/phinx/20170330135806_add_api_key_table.php +++ b/database/migrations/phinx/20170330135806_add_api_key_table.php @@ -24,6 +24,6 @@ public function up() */ public function down() { - $this->dropTable('apikeys'); + $this->table('apikeys')->drop()->save(); } } diff --git a/database/migrations/phinx/20170419000000_drop_old_oauth_tables.php b/database/migrations/phinx/20170419000000_drop_old_oauth_tables.php index 5e4fa4b5e5..9e8a44be66 100644 --- a/database/migrations/phinx/20170419000000_drop_old_oauth_tables.php +++ b/database/migrations/phinx/20170419000000_drop_old_oauth_tables.php @@ -9,16 +9,16 @@ class DropOldOauthTables extends AbstractMigration */ public function up() { - $this->dropTable('oauth_session_refresh_tokens'); - $this->dropTable('oauth_session_token_scopes'); - $this->dropTable('oauth_session_authcode_scopes'); - $this->dropTable('oauth_session_access_tokens'); - $this->dropTable('oauth_session_authcodes'); - $this->dropTable('oauth_session_redirects'); - $this->dropTable('oauth_sessions'); - $this->dropTable('oauth_client_endpoints'); - $this->dropTable('oauth_clients'); - $this->dropTable('oauth_scopes'); + $this->table('oauth_session_refresh_tokens')->drop()->save(); + $this->table('oauth_session_token_scopes')->drop()->save(); + $this->table('oauth_session_authcode_scopes')->drop()->save(); + $this->table('oauth_session_access_tokens')->drop()->save(); + $this->table('oauth_session_authcodes')->drop()->save(); + $this->table('oauth_session_redirects')->drop()->save(); + $this->table('oauth_sessions')->drop()->save(); + $this->table('oauth_client_endpoints')->drop()->save(); + $this->table('oauth_clients')->drop()->save(); + $this->table('oauth_scopes')->drop()->save(); } /** diff --git a/database/migrations/phinx/20170525003110_drop_forms_tags_table.php b/database/migrations/phinx/20170525003110_drop_forms_tags_table.php index 781ecba7da..4d181b4dd7 100644 --- a/database/migrations/phinx/20170525003110_drop_forms_tags_table.php +++ b/database/migrations/phinx/20170525003110_drop_forms_tags_table.php @@ -27,7 +27,7 @@ class DropFormsTagsTable extends AbstractMigration */ public function up() { - $this->dropTable('forms_tags'); + $this->table('forms_tags')->drop()->save(); } public function down() diff --git a/database/migrations/phinx/20170712152806_add_tos_table.php b/database/migrations/phinx/20170712152806_add_tos_table.php index aa0da40841..3ee60570dc 100644 --- a/database/migrations/phinx/20170712152806_add_tos_table.php +++ b/database/migrations/phinx/20170712152806_add_tos_table.php @@ -25,6 +25,6 @@ public function up() */ public function down() { - $this->dropTable('tos'); + $this->table('tos')->drop()->save(); } } diff --git a/database/migrations/phinx/20170929155823_add_post_lock_table.php b/database/migrations/phinx/20170929155823_add_post_lock_table.php index a8b467a485..9090a651e3 100644 --- a/database/migrations/phinx/20170929155823_add_post_lock_table.php +++ b/database/migrations/phinx/20170929155823_add_post_lock_table.php @@ -28,6 +28,6 @@ public function up() */ public function down() { - $this->dropTable('post_locks'); + $this->table('post_locks')->drop()->save(); } } diff --git a/database/migrations/phinx/20180212204016_create_export_job_table.php b/database/migrations/phinx/20180212204016_create_export_job_table.php index 906fc6ff6e..d1fdfa17b1 100644 --- a/database/migrations/phinx/20180212204016_create_export_job_table.php +++ b/database/migrations/phinx/20180212204016_create_export_job_table.php @@ -31,6 +31,6 @@ public function up() */ public function down() { - $this->dropTable('export_job'); + $this->table('export_job')->drop()->save(); } } diff --git a/database/migrations/phinx/20180316133403_add_country_code_table.php b/database/migrations/phinx/20180316133403_add_country_code_table.php index 3a3029261e..0febe4e4fe 100644 --- a/database/migrations/phinx/20180316133403_add_country_code_table.php +++ b/database/migrations/phinx/20180316133403_add_country_code_table.php @@ -53,6 +53,6 @@ public function up() */ public function down() { - $this->dropTable('country_codes'); + $this->table('country_codes')->drop()->save(); } } diff --git a/database/migrations/phinx/20180316193138_contact_post_state.php b/database/migrations/phinx/20180316193138_contact_post_state.php index 1798787884..6f56991be2 100644 --- a/database/migrations/phinx/20180316193138_contact_post_state.php +++ b/database/migrations/phinx/20180316193138_contact_post_state.php @@ -54,6 +54,6 @@ public function up() */ public function down() { - $this->dropTable('targeted_survey_state'); + $this->table('targeted_survey_state')->drop()->save(); } } diff --git a/database/migrations/phinx/20180327105646_contact_post_state_to_targeted_survey.php b/database/migrations/phinx/20180327105646_contact_post_state_to_targeted_survey.php index 48ba7d61ff..6ad951e723 100644 --- a/database/migrations/phinx/20180327105646_contact_post_state_to_targeted_survey.php +++ b/database/migrations/phinx/20180327105646_contact_post_state_to_targeted_survey.php @@ -11,7 +11,7 @@ class ContactPostStateToTargetedSurvey extends AbstractMigration */ public function up() { - $this->dropTable('targeted_survey_state'); + $this->table('targeted_survey_state')->drop()->save(); $this->table('targeted_survey_state') ->addColumn('form_id', 'integer', ['null' => false]) ->addColumn('post_id', 'integer', ['null' => false]) @@ -50,7 +50,7 @@ public function up() */ public function down() { - $this->dropTable('targeted_survey_state'); + $this->table('targeted_survey_state')->drop()->save(); $this->table('targeted_survey_state') ->addColumn('post_id', 'integer', ['null' => false]) ->addColumn('contact_id', 'integer', ['null' => false]) diff --git a/database/migrations/phinx/20180507162526_create_license_table.php b/database/migrations/phinx/20180507162526_create_license_table.php index 6e710f29ee..65168459d7 100644 --- a/database/migrations/phinx/20180507162526_create_license_table.php +++ b/database/migrations/phinx/20180507162526_create_license_table.php @@ -30,6 +30,6 @@ public function up() */ public function down() { - $this->dropTable('hxl_license'); + $this->table('hxl_license')->drop()->save(); } } diff --git a/database/migrations/phinx/20180507182549_create_hxl_tags_tables.php b/database/migrations/phinx/20180507182549_create_hxl_tags_tables.php index d1594f8775..e58c80a3a2 100644 --- a/database/migrations/phinx/20180507182549_create_hxl_tags_tables.php +++ b/database/migrations/phinx/20180507182549_create_hxl_tags_tables.php @@ -65,9 +65,9 @@ public function up() public function down() { - $this->dropTable('hxl_tag_attributes'); - $this->dropTable('hxl_attribute_type_tag'); - $this->dropTable('hxl_attributes'); - $this->dropTable('hxl_tags'); + $this->table('hxl_tag_attributes')->drop()->save(); + $this->table('hxl_attribute_type_tag')->drop()->save(); + $this->table('hxl_attributes')->drop()->save(); + $this->table('hxl_tags')->drop()->save(); } } diff --git a/database/migrations/phinx/20180508154706_add_user_settings_table.php b/database/migrations/phinx/20180508154706_add_user_settings_table.php index 1d60c12478..202f06585a 100644 --- a/database/migrations/phinx/20180508154706_add_user_settings_table.php +++ b/database/migrations/phinx/20180508154706_add_user_settings_table.php @@ -38,6 +38,6 @@ public function up() */ public function down() { - $this->dropTable('user_settings'); + $this->table('user_settings')->drop()->save(); } } diff --git a/database/migrations/phinx/20180512175804_add_hxl_metadata_table.php b/database/migrations/phinx/20180512175804_add_hxl_metadata_table.php index 8dcdb96227..3eba9ca42c 100644 --- a/database/migrations/phinx/20180512175804_add_hxl_metadata_table.php +++ b/database/migrations/phinx/20180512175804_add_hxl_metadata_table.php @@ -55,6 +55,6 @@ public function up() public function down() { - $this->dropTable('hxl_meta_data'); + $this->table('hxl_meta_data')->drop()->save(); } } diff --git a/database/migrations/phinx/20180512214359_create_form_attribute_hxl_attribute_tag_table.php b/database/migrations/phinx/20180512214359_create_form_attribute_hxl_attribute_tag_table.php index 09052483fd..4c27a5c63c 100644 --- a/database/migrations/phinx/20180512214359_create_form_attribute_hxl_attribute_tag_table.php +++ b/database/migrations/phinx/20180512214359_create_form_attribute_hxl_attribute_tag_table.php @@ -27,12 +27,12 @@ public function up() ->addForeignKey('hxl_attribute_id', 'hxl_attributes', 'id', ['delete'=>'CASCADE', 'update'=>'CASCADE']) ->addForeignKey('hxl_tag_id', 'hxl_tags', 'id', ['delete'=>'CASCADE', 'update'=>'CASCADE']) ->addForeignKey('export_job_id', 'export_job', 'id', ['delete'=>'CASCADE', 'update'=>'CASCADE']) - ->setOptions(['comment' => 'The link between the form attributes and tags assigned to an export job. - This lets us set the hxl header correctly and search for the assigned values']) + // ->setOptions(['comment' => 'The link between the form attributes and tags assigned to an export job. + // This lets us set the hxl header correctly and search for the assigned values']) ->create(); } public function down() { - $this->dropTable('form_attribute_hxl_attribute_tag'); + $this->table('form_attribute_hxl_attribute_tag')->drop()->save(); } } diff --git a/database/migrations/phinx/20200506131856_add_entity_translations.php b/database/migrations/phinx/20200506131856_add_entity_translations.php index 18f3b02e48..c61fe7ba6b 100644 --- a/database/migrations/phinx/20200506131856_add_entity_translations.php +++ b/database/migrations/phinx/20200506131856_add_entity_translations.php @@ -18,6 +18,6 @@ public function up() } public function down() { - $this->dropTable('translations'); + $this->table('translations')->drop()->save(); } } diff --git a/database/migrations/phinx/20200509204243_add_language_to_survey.php b/database/migrations/phinx/20200509204243_add_language_to_survey.php index bb6d344809..2dfff4e909 100644 --- a/database/migrations/phinx/20200509204243_add_language_to_survey.php +++ b/database/migrations/phinx/20200509204243_add_language_to_survey.php @@ -1,5 +1,6 @@ table('forms') ->addColumn('base_language', 'string', ['null' => false, 'default' => $language]) //es/en ->update(); diff --git a/database/migrations/phinx/20200521014822_add_base_language_to_categories.php b/database/migrations/phinx/20200521014822_add_base_language_to_categories.php index 93f4a20e2e..fd2a6189c5 100644 --- a/database/migrations/phinx/20200521014822_add_base_language_to_categories.php +++ b/database/migrations/phinx/20200521014822_add_base_language_to_categories.php @@ -1,5 +1,6 @@ table('tags') ->addColumn('base_language', 'string', ['null' => false, 'default' => $language]) //es/en ->update(); diff --git a/database/migrations/phinx/20200607230330_add_base_language_to_posts.php b/database/migrations/phinx/20200607230330_add_base_language_to_posts.php index a39313181a..ba9e23c0e6 100644 --- a/database/migrations/phinx/20200607230330_add_base_language_to_posts.php +++ b/database/migrations/phinx/20200607230330_add_base_language_to_posts.php @@ -1,5 +1,6 @@ table('posts') ->addColumn('base_language', 'string', ['null' => false, 'default' => $language]) //es/en ->update();