Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails due to failing migrations. #6316

Open
putzwasser opened this issue Sep 7, 2022 · 0 comments
Open

Installation fails due to failing migrations. #6316

putzwasser opened this issue Sep 7, 2022 · 0 comments

Comments

@putzwasser
Copy link

Describe the bug
The installation fails, but you won't notice it until I try to login.

The server yields this error:

Whoops! Something went wrong.
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'address_book_id' in 'where clause' (SQL: select accounts., (select count() from contacts where accounts.id = contacts.account_id and address_book_id is null and contacts.deleted_at is null) as contacts_count, (select count() from reminders where accounts.id = reminders.account_id) as reminders_count, (select count() from notes where accounts.id = notes.account_id) as notes_count, (select count() from activities where accounts.id = activities.account_id) as activities_count, (select count() from gifts where accounts.id = gifts.account_id) as gifts_count, (select count(*) from tasks where accounts.id = tasks.account_id) as tasks_count from accounts where accounts.id = 1 limit 1)

I'm pretty sure, it's because it won't apply all the migrations during installation.

php artisan setup:production --email=me@the.web --password=myPassw0rd -v runs without error. But:

$ php artisan migrate:status
+------+------------------------------------------------------------------------------------+-------+
| Ran? | Migration                                                                          | Batch |
+------+------------------------------------------------------------------------------------+-------+
| Yes  | 2014_10_12_000000_create_users_table                                               | 1     |
| Yes  | 2014_10_12_100000_create_password_resets_table                                     | 1     |
| Yes  | 2016_06_01_000001_create_oauth_auth_codes_table                                    | 1     |
| Yes  | 2016_06_01_000002_create_oauth_access_tokens_table                                 | 1     |
| Yes  | 2016_06_01_000003_create_oauth_refresh_tokens_table                                | 1     |
| Yes  | 2016_06_01_000004_create_oauth_clients_table                                       | 1     |
| Yes  | 2016_06_01_000005_create_oauth_personal_access_clients_table                       | 1     |
| Yes  | 2016_06_07_234741_create_account_table                                             | 1     |
| Yes  | 2016_06_08_003006_add_account_info_table                                           | 1     |
| Yes  | 2016_06_08_005413_create_contacts_table                                            | 1     |
| Yes  | 2016_06_25_224219_create_reminder_type_table                                       | 1     |
| Yes  | 2016_06_28_191025_create_tasks_table                                               | 1     |
| Yes  | 2016_06_30_185050_create_notes_table                                               | 1     |
| Yes  | 2016_07_25_133835_add_width_field                                                  | 1     |
| Yes  | 2016_08_28_122938_create_kids_table                                                | 1     |
| Yes  | 2016_08_28_215159_create_relations_table                                           | 1     |
| Yes  | 2016_09_03_202027_add_reminder_id_to_contacts                                      | 1     |
| Yes  | 2016_09_05_134937_add_last_talked_to_field                                         | 1     |
| Yes  | 2016_09_05_135927_add_people_id_to_contacts                                        | 1     |
| Yes  | 2016_09_05_145111_add_name_info_to_peoples                                         | 1     |
| Yes  | 2016_09_06_213550_create_activity_type_table                                       | 1     |
| Yes  | 2016_09_10_164406_create_jobs_table                                                | 1     |
| Yes  | 2016_09_10_170122_create_notifications_table                                       | 1     |
| Yes  | 2016_09_12_014120_create_failed_jobs_table                                         | 1     |
| Yes  | 2016_09_30_014720_add_kid_to_reminder                                              | 1     |
| Yes  | 2016_10_15_024156_add_deleted_at_to_users                                          | 1     |
| Yes  | 2016_10_19_155139_create_cache_table                                               | 1     |
| Yes  | 2016_10_19_155800_create_sessions_table                                            | 1     |
| Yes  | 2016_10_21_022941_add_statistics_table                                             | 1     |
| Yes  | 2016_10_24_013543_add_journal_setting_to_users                                     | 1     |
| Yes  | 2016_10_24_014257_create_journal_tables                                            | 1     |
| Yes  | 2016_10_28_002518_add_metric_to_settings                                           | 1     |
| Yes  | 2016_11_01_014353_create_activities_table                                          | 1     |
| Yes  | 2016_11_01_015957_add_icon_column                                                  | 1     |
| Yes  | 2016_11_03_150307_add_activity_location_to_activities                              | 1     |
| Yes  | 2016_11_09_013049_add_events_table                                                 | 1     |
| Yes  | 2016_12_08_011555_remove_type_from_notes                                           | 1     |
| Yes  | 2016_12_13_133945_add_gifts_table                                                  | 1     |
| Yes  | 2016_12_28_150831_change_title_column                                              | 1     |
| Yes  | 2017_01_14_200815_add_facebook_columns_to_users_table                              | 1     |
| Yes  | 2017_01_15_045025_add_colors_to_users                                              | 1     |
| Yes  | 2017_01_22_142645_add_fields_to_contacts                                           | 1     |
| Yes  | 2017_01_23_043831_change_people_to_contact_for_kids                                | 1     |
| Yes  | 2017_01_26_013524_change_people_to_significantother                                | 1     |
| Yes  | 2017_01_26_022852_change_notes_to_contact                                          | 1     |
| Yes  | 2017_01_26_034553_add_notes_count_to_contact                                       | 1     |
| Yes  | 2017_01_27_024356_change_people_in_events                                          | 1     |
| Yes  | 2017_01_28_180156_remove_deleted_at_from_significant_others                        | 1     |
| Yes  | 2017_01_28_184901_remove_deleted_at_from_kids                                      | 1     |
| Yes  | 2017_01_28_193913_remove_deleted_at_from_notes                                     | 1     |
| Yes  | 2017_01_28_222114_remove_viewed_at_from_contacts                                   | 1     |
| Yes  | 2017_01_29_175146_remove_delete_at_from_activities                                 | 1     |
| Yes  | 2017_01_29_175629_add_number_activities_to_contacts                                | 1     |
| Yes  | 2017_01_31_025849_add_activity_statistics_table                                    | 1     |
| Yes  | 2017_02_02_232450_add_confirmation                                                 | 1     |
| Yes  | 2017_02_04_225618_change_reminders_table                                           | 1     |
| Yes  | 2017_02_05_035925_add_gifts_metrics_to_contacts                                    | 1     |
| Yes  | 2017_02_05_041740_change_gifts_table                                               | 1     |
| Yes  | 2017_02_05_042122_change_people_to_contact_for_gifts                               | 1     |
| Yes  | 2017_02_07_041607_change_tasks_table                                               | 1     |
| Yes  | 2017_02_07_051355_add_number_tasks_to_contact                                      | 1     |
| Yes  | 2017_02_08_002251_change_number_tasks_contact                                      | 1     |
| Yes  | 2017_02_08_025358_add_sort_preferences_to_users                                    | 1     |
| Yes  | 2017_02_10_195613_remove_notifications_table                                       | 1     |
| Yes  | 2017_02_10_214714_remove_people_table                                              | 1     |
| Yes  | 2017_02_10_215405_remove_entities_table                                            | 1     |
| Yes  | 2017_02_10_224355_calculate_statistics                                             | 1     |
| Yes  | 2017_02_11_154900_add_avatars_to_contacts                                          | 1     |
| Yes  | 2017_02_12_134220_create_entries_table                                             | 1     |
| Yes  | 2017_05_03_155254_move_significant_other_data                                      | 1     |
| Yes  | 2017_05_04_164723_remove_contact_encryption                                        | 1     |
| Yes  | 2017_05_04_185921_add_title_to_activities                                          | 1     |
| Yes  | 2017_05_04_193252_alter_activity_nullable                                          | 1     |
| Yes  | 2017_05_08_164514_remove_encryption_tasks                                          | 1     |
| Yes  | 2017_05_30_002239_remove_predefined_reminders                                      | 1     |
| Yes  | 2017_05_30_023116_create_money_table                                               | 1     |
| Yes  | 2017_06_07_173437_add_multiple_genders_choices                                     | 1     |
| Yes  | 2017_06_10_152945_add_social_networks_to_contacts                                  | 1     |
| Yes  | 2017_06_10_155349_create_currencies_data                                           | 1     |
| Yes  | 2017_06_11_025227_remove_encryption_journal                                        | 1     |
| Yes  | 2017_06_11_110735_change_unique_constraint_for_contacts                            | 1     |
| Yes  | 2017_06_13_035059_remove_gifts_encryption                                          | 1     |
| Yes  | 2017_06_13_195740_add_company_to_contacts                                          | 1     |
| Yes  | 2017_06_14_131803_remove_bern_timezone                                             | 1     |
| Yes  | 2017_06_14_132911_add_zar_currency_to_currencies_table                             | 1     |
| Yes  | 2017_06_16_215256_add_about_who_to_reminders                                       | 1     |
| Yes  | 2017_06_17_010900_fix_contacts_table                                               | 1     |
| Yes  | 2017_06_17_153814_refactor_user_table                                              | 1     |
| Yes  | 2017_06_19_105842_add_stripe_fields_to_users                                       | 1     |
| Yes  | 2017_06_20_121345_add_invitations_statistics                                       | 1     |
| Yes  | 2017_06_22_210813_add_name_order_to_users                                          | 1     |
| Yes  | 2017_06_27_134704_create_import_table                                              | 1     |
| Yes  | 2017_06_29_211725_add_import_job_to_statistics                                     | 1     |
| Yes  | 2017_06_29_230523_add_gravatar_url_to_users                                        | 1     |
| Yes  | 2017_07_02_155736_create_tags_table                                                | 1     |
| Yes  | 2017_07_04_132743_add_tags_to_statistics                                           | 1     |
| Yes  | 2017_07_09_164312_update_bad_translation_key                                       | 1     |
| Yes  | 2017_07_12_014244_create_calls_table                                               | 1     |
| Yes  | 2017_07_17_005012_drop_reminders_count_from_contacts                               | 1     |
| Yes  | 2017_07_18_215312_add_danish_kroner_to_currencies_table                            | 1     |
| Yes  | 2017_07_18_215758_add_indian_rupee_to_currencies_table                             | 1     |
| Yes  | 2017_07_19_094503_add_brazilian_real_to_currencies                                 | 1     |
| Yes  | 2017_07_22_153209_create_instance_table                                            | 1     |
| Yes  | 2017_07_26_220021_change_contacts_table                                            | 1     |
| Yes  | 2017_08_02_152838_change_string_to_boolean_for_reminders                           | 1     |
| Yes  | 2017_08_06_085629_change_events_data                                               | 1     |
| Yes  | 2017_08_06_153253_move_kids_to_contacts                                            | 1     |
| Yes  | 2017_08_16_041431_add_contact_avatar_location                                      | 1     |
| Yes  | 2017_08_21_224835_remove_paid_limitations_for_current_users                        | 1     |
| Yes  | 2017_09_10_125918_remove_unusued_counters                                          | 1     |
| Yes  | 2017_09_13_095923_add_tracking_table                                               | 1     |
| Yes  | 2017_09_13_191714_add_partial_notion                                               | 1     |
| Yes  | 2017_10_14_083556_change_gift_column_structure                                     | 1     |
| Yes  | 2017_10_17_170803_change_gift_structure                                            | 1     |
| Yes  | 2017_10_19_134816_create_activity_contact_table                                    | 1     |
| Yes  | 2017_10_19_135215_move_activities_to_pivot_table                                   | 1     |
| Yes  | 2017_10_25_102923_remove_contact_id_activities_table                               | 1     |
| Yes  | 2017_11_01_122541_add_met_through_to_contacts                                      | 1     |
| Yes  | 2017_11_02_202601_add_is_dead_to_contacts                                          | 1     |
| Yes  | 2017_11_10_174654_create_contact_fields_table                                      | 1     |
| Yes  | 2017_11_10_181043_migrate_contacts_information                                     | 1     |
| Yes  | 2017_11_10_202620_move_addresses_from_contact_to_addresses                         | 1     |
| Yes  | 2017_11_10_204035_delete_contact_fields_from_contacts                              | 1     |
| Yes  | 2017_11_20_115635_change-amount-to-double-on-debts                                 | 1     |
| Yes  | 2017_11_27_083043_add_more_statistics                                              | 1     |
| Yes  | 2017_11_27_134403_add_new_avatar_to_contacts                                       | 1     |
| Yes  | 2017_11_27_202857_change_tasks_table_structure                                     | 1     |
| Yes  | 2017_12_01_113748_update_notes                                                     | 1     |
| Yes  | 2017_12_04_164831_create_ages_table                                                | 1     |
| Yes  | 2017_12_04_165421_move_ages_data                                                   | 1     |
| Yes  | 2017_12_10_181535_remove_important_dates_table                                     | 1     |
| Yes  | 2017_12_10_205328_add_account_id_to_activities                                     | 1     |
| Yes  | 2017_12_10_214545_add_last_consulted_at_to_contacts                                | 1     |
| Yes  | 2017_12_13_115857_create_day_table                                                 | 1     |
| Yes  | 2017_12_21_163616_update_journal_entries_with_existing_activities                  | 1     |
| Yes  | 2017_12_21_170327_add_google2fa_secret_to_users                                    | 1     |
| Yes  | 2017_12_24_115641_create_pets_table                                                | 1     |
| Yes  | 2017_12_31_114224_add_dashboard_tab_to_users                                       | 1     |
| Yes  | 2018_01_15_105858_create_additional_reminders_table                                | 1     |
| Yes  | 2018_01_16_203358_add_gift_received                                                | 1     |
| Yes  | 2018_01_16_212320_rename_gift_columns                                              | 1     |
| Yes  | 2018_01_17_230820_add_gift_tab_view_to_users                                       | 1     |
| Yes  | 2018_01_27_014146_add_custom_gender                                                | 1     |
| Yes  | 2018_02_25_202752_change_locale_in_db                                              | 1     |
| Yes  | 2018_02_28_223747_update_notification_table                                        | 1     |
| Yes  | 2018_03_03_204440_create_relationship_type_table                                   | 1     |
| Yes  | 2018_03_18_085815_populate_default_relationship_type_tables                        | 1     |
| Yes  | 2018_03_18_090209_populate_relationship_type_tables_with_default_values            | 1     |
| Yes  | 2018_03_18_090345_migrate_current_relationship_table_to_new_relationship_structure | 1     |
| Yes  | 2018_03_24_083258_migrate_offsprings                                               | 1     |
| Yes  | 2018_04_04_220850_create_default_modules_table                                     | 1     |
| Yes  | 2018_04_04_222608_create_account_modules_table                                     | 1     |
| Yes  | 2018_04_10_205655_fix_production_error                                             | 1     |
| Yes  | 2018_04_10_222515_migrate-modules                                                  | 1     |
| Yes  | 2018_04_13_131008_fix-contacts-data                                                | 1     |
| Yes  | 2018_04_13_205231_create_changes_table                                             | 1     |
| Yes  | 2018_04_14_081052_fix_wrong_gender                                                 | 1     |
| Yes  | 2018_04_19_190239_stay_in_touch                                                    | 1     |
| Yes  | 2018_05_06_061227_external_countries                                               | 1     |
| Yes  | 2018_05_07_070458_create_terms_table                                               | 1     |
| Yes  | 2018_05_13_110706_add_ex_wife_husband_relationship                                 | 1     |
| Yes  | 2018_05_16_143631_add_nickname_to_contacts                                         | 1     |
| Yes  | 2018_05_16_214222_add_timestamps_to_currencies                                     | 1     |
| Yes  | 2018_05_20_121028_accept_terms                                                     | 1     |
| Yes  | 2018_05_20_225034_change_name_order_user-_preferencies                             | 1     |
| Yes  | 2018_05_24_160546_fix-inconsistant-reminder-time                                   | 1     |
| Yes  | 2018_06_10_191450_add_love_metadata_relationshisp                                  | 1     |
| Yes  | 2018_06_10_221746_migrate_entries_objects                                          | 1     |
| Yes  | 2018_06_11_184017_change_default_user_table                                        | 1     |
| Yes  | 2018_06_13_000100_create_u2f_key_table                                             | 1     |
| Yes  | 2018_06_14_212502_change_default_name_order_user_table                             | 1     |
| Yes  | 2018_07_03_204220_create_default_activity_type_groups_table                        | 1     |
| Yes  | 2018_07_08_104306_update-timestamps-timezone                                       | 1     |
| Yes  | 2018_07_26_104306_create-conversations                                             | 1     |
| Yes  | 2018_08_06_145046_add_starred_to_contacts                                          | 1     |
| Yes  | 2018_08_09_18000_fix-empty-reminder-time                                           | 1     |
| Yes  | 2018_08_18_180426_add_legacy_free_plan                                             | 1     |
| Yes  | 2018_08_29_124804_add_conversations_to_statistics                                  | 1     |
| Yes  | 2018_08_29_222051_add_conversations_to_modules                                     | 1     |
| Yes  | 2018_08_31_020908_create_life_events_table                                         | 1     |
| Yes  | 2018_09_02_150531_contact_archiving                                                | 1     |
| Yes  | 2018_09_05_025008_add_default_profile_view                                         | 1     |
| Yes  | 2018_09_05_213507_mark_modules_migrated                                            | 1     |
| Yes  | 2018_09_13_135926_add_description_field_to_contacts                                | 1     |
| Yes  | 2018_09_18_142844_remove_events                                                    | 1     |
| Yes  | 2018_09_23_024528_add_documents_table                                              | 1     |
| Yes  | 2018_09_29_114125_add_reminder_to_life_events                                      | 1     |
| Yes  | 2018_10_01_211757_add_number_of_views                                              | 1     |
| Yes  | 2018_10_04_181116_life_event_vehicle                                               | 1     |
| Yes  | 2018_10_07_120133_fix_json_column                                                  | 1     |
| Yes  | 2018_10_16_000703_add_documents_to_module_table                                    | 1     |
| Yes  | 2018_10_19_081816_life_event_tattoo                                                | 1     |
| Yes  | 2018_10_27_230346_fix_non_english_tab_slugs                                        | 1     |
| Yes  | 2018_10_28_165814_email_verified                                                   | 1     |
| Yes  | 2018_11_11_145035_remove_changelogs_table                                          | 1     |
| Yes  | 2018_11_15_172333_make_contact_id_nullable_in_tasks                                | 1     |
| Yes  | 2018_11_18_021908_create_images_table                                              | 1     |
| Yes  | 2018_11_21_212932_add_contacts_uuid                                                | 1     |
| Yes  | 2018_11_25_020818_add_contact_photo_table                                          | 1     |
| Yes  | 2018_11_30_154729_recovery_codes                                                   | 1     |
| Yes  | 2018_12_08_233140_add_who_called_to_calls                                          | 1     |
| Yes  | 2018_12_09_023232_add_emotions_table                                               | 1     |
| Yes  | 2018_12_09_145956_create_emotion_call_table                                        | 1     |
| Yes  | 2018_12_16_195440_add_gps_coordinates_to_addressess                                | 1     |
| Yes  | 2018_12_19_002819_create_places_table                                              | 1     |
| Yes  | 2018_12_19_003444_move_addresses_data                                              | 1     |
| Yes  | 2018_12_21_235418_add_weather_table                                                | 1     |
| Yes  | 2018_12_22_021123_add_weather_preferences_to_users                                 | 1     |
| Yes  | 2018_12_22_200413_add_reminder_initial_date_to_reminders                           | 1     |
| Yes  | 2018_12_24_164256_add_companies_table                                              | 1     |
| Yes  | 2018_12_24_220019_add_occupations_table                                            | 1     |
| Yes  | 2018_12_25_001736_add_linkedin_to_default_contact_field_type                       | 1     |
| Yes  | 2018_12_25_012011_move_linkedin_data_to_contact_field_type                         | 1     |
| Yes  | 2018_12_29_091017_default_temperature_scale                                        | 1     |
| Yes  | 2018_12_29_135516_sync_token                                                       | 1     |
| Yes  | 2019_01_05_152329_add_reminder_ids_to_contacts                                     | 1     |
| Yes  | 2019_01_05_152405_migrate_previous_remiders                                        | 1     |
| Yes  | 2019_01_05_152456_drop_special_date_id_from_reminders                              | 1     |
| Yes  | 2019_01_05_152526_schedule_new_reminders                                           | 1     |
| Yes  | 2019_01_05_202557_add_foreign_keys_to_reminder                                     | 1     |
| Yes  | 2019_01_05_202748_add_foreign_key_to_reminder_rule                                 | 1     |
| Yes  | 2019_01_05_202938_add_foreign_key_to_contacts                                      | 1     |
| Yes  | 2019_01_05_203201_add_foreign_key_for_reminder_in_life-events_table                | 1     |
| Yes  | 2019_01_06_135133_update_u2f_key_table                                             | 1     |
| Yes  | 2019_01_06_150143_add_inactive_flag_to_reminders                                   | 1     |
| Yes  | 2019_01_06_190036_u2f_key_name                                                     | 1     |
| Yes  | 2019_01_11_142944_add_foreign_keys_to_activities                                   | 1     |
| Yes  | 2019_01_11_183717_change_activities_date_type                                      | 1     |
| Yes  | 2019_01_17_093812_add_admin_user                                                   | 1     |
| Yes  | 2019_01_18_142032_add_dav_uuid                                                     | 1     |
| Yes  | 2019_01_22_034555_create_emotion_activity_table                                    | 1     |
| Yes  | 2019_01_24_221539_change_activity_model_location                                   | 1     |
| Yes  | 2019_01_31_223600_add_swiss_chf_to_currencies_table                                | 1     |
| Yes  | 2019_02_08_234959_remove_users_without_account                                     | 1     |
| Yes  | 2019_02_09_200203_add_gender_type                                                  | 1     |
| Yes  | 2019_02_17_112452_add_default_gender                                               | 1     |
| Yes  | 2019_02_20_205744_allow_gender_null                                                | 1     |
| Yes  | 2019_02_24_223855_remove_relation_type_name                                        | 1     |
| Yes  | 2019_03_27_103012_set_default_profile_links                                        | 1     |
| Yes  | 2019_03_29_163611_add_webauthn                                                     | 1     |
| Yes  | 2019_05_05_194746_add_cron_schedule                                                | 1     |
| Yes  | 2019_05_15_205533_rename_preferences                                               | 1     |
| Yes  | 2019_05_26_000000_add_relationship_table_indexes                                   | 1     |
| Yes  | 2019_05_27_000000_populate_relationship_type_tables_with_stepparent_values         | 1     |
| Yes  | 2019_08_12_213308_change_avatars_structure                                         | 1     |
| Yes  | 2019_08_12_222938_create_avatars_for_existing_contacts                             | 1     |
| Yes  | 2019_08_13_160332_add_me_contact_on_user                                           | 1     |
| Yes  | 2019_08_14_091427_update_stripe_columns                                            | 1     |
| Yes  | 2019_09_04_075311_fix_tattoo_or_piercing_translation                               | 1     |
| Yes  | 2019_12_17_024553_add_foreign_keys                                                 | 1     |
| Yes  | 2019_12_21_100315_change_gift_status                                               | 1     |
| Yes  | 2019_12_21_194559_add_photo_gift                                                   | 1     |
| Yes  | 2019_12_27_23533_rename_picnicked                                                  | 1     |
| Yes  | 2020_02_03_015403_create_audit_log_table                                           | 1     |
| No   | 2020_02_18_211620_add_contact_field_label                                          |       |
| No   | 2020_03_22_132429_rename_birthday_reminder_title_deceased                          |       |
| No   | 2020_03_25_055551_add_address_book                                                 |       |
| No   | 2020_03_25_065551_add_addressbook_subscription                                     |       |
| No   | 2020_03_25_082324_add_contact_address_book_id                                      |       |
| No   | 2020_03_25_201407_add_contact_vcard_data                                           |       |
| No   | 2020_04_24_185810_remove_duplicate_currency                                        |       |
| No   | 2020_04_24_205810_currencies_table_seed                                            |       |
| No   | 2020_04_24_212138_update_amount_format                                             |       |
| No   | 2020_05_08_072433_google2fa_column_size                                            |       |
| No   | 2020_05_31_091556_custom_life_event_types                                          |       |
| No   | 2020_08_05_184814_upgrade_passport                                                 |       |
| No   | 2020_11_01_000001_create_subscription_items_table                                  |       |
| No   | 2020_12_19_205923_add_uuids                                                        |       |
| No   | 2021_04_23_190837_remove_reminder_sent                                             |       |
| No   | 2021_09_27_023405_create_job_batches_table                                         |       |
| No   | 2021_10_11_060512_add_distant_etag                                                 |       |
| No   | 2021_10_14_212144_v_card_company                                                   |       |
| No   | 2022_01_01_202745_add_export_jobs                                                  |       |
| No   | 2022_01_02_222042_contact_soft_delete                                              |       |
+------+------------------------------------------------------------------------------------+-------+

Tried to apply the migrations manually:

$ php artisan migrate
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Migrating: 2020_02_18_211620_add_contact_field_label

In Connection.php line 712:
                                                                                                                                                                                                                    
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'contact_field_labels' already exists (SQL: create table `contact_field_labels` (`id` bigint unsigned not null auto_increment primary key, `accou  
  nt_id` int unsigned not null, `label_i18n` varchar(20) null, `label` varchar(500) null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8 collate 'utf8_unicode_ci')           
                                                                                                                                                                                                                    

In Connection.php line 501:
                                                                                                        
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'contact_field_labels' already exists  
                                                                                                        

Deleted the tables:

$ php artisan migrate
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Migrating: 2020_02_18_211620_add_contact_field_label

In Connection.php line 712:
                                                                                                                                                                                                                    
  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `contact_field_labels` add index `contact_field_labels_label_account_id_index  
  `(`label`, `account_id`))                                                                                                                                                                                         
                                                                                                                                                                                                                    

In Connection.php line 501:
                                                                                                                    
  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes  
                                                                                                                    

Don't know, what to do.

Additional context

#
# Welcome, friend ❤. Thanks for trying out Monica. We hope you'll have fun.
#

# Two choices: local|production. Use local if you want to install Monica as a
# development version. Use production otherwise.
APP_ENV=production

# true if you want to show debug information on errors. For production, put this
# to false.
APP_DEBUG=false

# The encryption key. This is the most important part of the application. Keep
# this secure otherwise, everyone will be able to access your application.
# Must be 32 characters long exactly.
# Use `php artisan key:generate` or `echo -n 'base64:'; openssl rand -base64 32` to generate a random key.
APP_KEY=

# Prevent information leakage by referring to IDs with hashIds instead of
# the actual IDs used in the database.
HASH_SALT=
HASH_LENGTH=18

# The URL of your application.
APP_URL=

# Force using APP_URL as base url of your application.
# You should not need this, unless you are using subdirectory config.
APP_FORCE_URL=false

# Database information
# To keep this information secure, we urge you to change the default password
# Currently only "mysql" compatible servers are working
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
# You can use mysql unix socket if available, it overrides DB_HOST and DB_PORT values.
#DB_UNIX_SOCKET=/var/run/mysqld/mysqld.sock
DB_DATABASE=db
DB_USERNAME=user
DB_PASSWORD=password
DB_PREFIX=
DB_TEST_HOST=127.0.0.1
DB_TEST_DATABASE=monica_test
DB_TEST_USERNAME=homestead
DB_TEST_PASSWORD=secret

# Use utf8mb4 database charset format to support emoji characters
# ⚠ be sure your DBMS supports utf8mb4 format
DB_USE_UTF8MB4=false

# Mail credentials used to send emails from the application.
MAIL_MAILER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=
# Outgoing emails will be sent with these identity
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME="Monica instance"
# New registration notification sent to this email
APP_EMAIL_NEW_USERS_NOTIFICATION=

# Ability to disable signups on your instance.
# Can be true or false. Default to false.
APP_DISABLE_SIGNUP=true

# Enable user email verification.
APP_SIGNUP_DOUBLE_OPTIN=false

# Set trusted proxy IP addresses.
# To trust all proxies that connect directly to your server, use a "*".
# To trust one or more specific proxies that connect directly to your server,
# use a comma separated list of IP addresses.
APP_TRUSTED_PROXIES=

# Enable automatic cloudflare trusted proxy discover
APP_TRUSTED_CLOUDFLARE=false

# Frequency of creation of new log files. Logs are written when an error occurs.
# Refer to config/logging.php for the possible values.
LOG_CHANNEL=daily

# Error tracking. Specific to hosted version on .com. You probably don't need
# those.
SENTRY_SUPPORT=false
SENTRY_LARAVEL_DSN=

# Send a daily ping to https://version.monicahq.com to check if a new version
# is available. When a new version is detected, you will have a message in the
# UI, as well as the release notes for the new changes. Can be true or false.
# Default to true.
CHECK_VERSION=true

# Cache, session, and queue parameters
# ⚠ Change this only if you know what you are doing
#. Cache: database, file, memcached, redis, dynamodb
#. Session: file, cookie, database, apc, memcached, redis, array
#. Queue: sync, database, beanstalkd, sqs, redis
#  If Queue is not set to 'sync', you'll have to set a queue worker
#  See https://laravel.com/docs/5.7/queues#running-the-queue-worker
CACHE_DRIVER=database
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_CONNECTION=sync

# If you use redis, set the redis host or ip, like:
#REDIS_HOST=redis

# Maximum allowed size for uploaded files, in kilobytes.
# Make sure this is an integer, without commas or spaces.
DEFAULT_MAX_UPLOAD_SIZE=10240

# Maximum allowed storage size per account, in megabytes.
# Make sure this is an integer, without commas or spaces.
DEFAULT_MAX_STORAGE_SIZE=512

# Default filesystem to store uploaded files.
# Possible values: public|s3
DEFAULT_FILESYSTEM=public

# AWS keys for S3 when using this storage method
AWS_KEY=
AWS_SECRET=
AWS_REGION=us-east-1
AWS_BUCKET=
AWS_SERVER=

# Set to true if you use S3 and need path style URL support for bucket access
# The default is to use virtual-hosted style URLs which may not work everywhere
S3_PATH_STYLE=

# Allow Two Factor Authentication feature on your instance
MFA_ENABLED=true

# Enable DAV support
DAV_ENABLED=true

# CLIENT ID and SECRET used for OAuth authentication
PASSPORT_PASSWORD_GRANT_CLIENT_ID=
PASSPORT_PASSWORD_GRANT_CLIENT_SECRET=

# Allow to access general statistics about your instance through a public API
# call
ALLOW_STATISTICS_THROUGH_PUBLIC_API_ACCESS=false

# Indicates that each user in the instance must comply to international policies
# like CASL or GDPR
POLICY_COMPLIANT=true

# Enable geolocation services
# This is used to translate addresses to GPS coordinates.
ENABLE_GEOLOCATION=false

# API key for geolocation services
# We use LocationIQ (https://locationiq.com/) to translate addresses to
# latitude/longitude coordinates. We could use Google instead but we don't
# want to give anything to Google, ever.
# LocationIQ offers 10,000 free requests per day.
LOCATION_IQ_API_KEY=

# Enable weather on contact profile page
# Weather can only be fetched if we know longitude/latitude - this is why
# you also need to activate the geolocation service above to make it work
ENABLE_WEATHER=false

# Access to weather data from darksky api
# https://www.weatherapi.com/signup.aspx
# You need to enable the weather above if you provide an API key here.
WEATHERAPI_KEY=

# Configure rate limits for RouteService per minute
RATE_LIMIT_PER_MINUTE_API=60
RATE_LIMIT_PER_MINUTE_OAUTH=5

PHP

PHP 8.1.7 (cli) (built: Jun 13 2022 07:58:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.7, Copyright (c) Zend Technologies

MySQL

Server-Type: MySQL
Server-Version: 5.7.37-nmm1-log - (Ubuntu)

Server

Apache
Database-Client Version: libmysql - mysqlnd 7.4.30
PHP-Extension: mysqli Dokumentation curl Dokumentation mbstring Dokumentation
PHP-Version: 7.4.30

I tried different .env settings in different combinations:

DB_PREFIX='m_'
DB_USE_UTF8MB4=true

It doesn't solve the problem. It just changes how many migrations get applied. Interestingly, php artisan setup:production fails in some configurations, too. But mostly it says:

    Monica v3.7.0 is set up, enjoy.
    ✓ Filling database
    Database seeding completed successfully.
    
    -----------------------------
    |
    | Welcome to Monica v3.7.0
    |
    -----------------------------
    | You can now log in to your account
    | URL:      https://
    -----------------------------
    Setup is done. Have fun.

I already added

    Schema::defaultStringLength(191);

to AppServiceProvider.php

Any suggestions how to solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant