cachethq / cachet

🚦 The open-source status page system.
https://cachethq.io
MIT License
13.79k stars 1.55k forks source link

Cache 3.x migration install error (test install) #4382

Closed kedesignzcom closed 3 months ago

kedesignzcom commented 3 months ago

We attempted a test install but encountered a database error. Then, I attempted a fresh DB migration with the same result.

Filing this issue for the maintainer to review.

SESSION_DRIVER=file

--

Dropping all tables ............................................. 837ms DONE

INFO Preparing database.

Creating migration table ......................................... 45ms DONE

INFO Running migrations.

2014_10_12_000000_create_users_table ............................ 112ms DONE 2014_10_12_100000_create_password_reset_tokens_table ............. 41ms DONE 2015_01_05_201324_CreateComponentGroupsTable ..................... 71ms DONE 2015_01_05_201444_CreateComponentsTable ......................... 294ms DONE 2015_01_05_202446_CreateIncidentTemplatesTable ................... 30ms DONE 2015_01_05_202609_CreateIncidentsTable .......................... 210ms DONE 2015_01_05_202730_CreateMetricPointsTable ........................ 72ms DONE 2015_01_05_202826_CreateMetricsTable ............................ 123ms DONE 2015_01_05_203014_CreateSettingsTable ............................ 41ms DONE 2015_01_05_203235_CreateSubscribersTable ........................ 115ms DONE 2015_01_16_083825_CreateTagsTable ................................ 53ms DONE 2015_01_16_084030_CreateComponentTagTable ........................ 51ms DONE 2015_02_28_214642_UpdateIncidentsAddScheduledAt .................. 32ms DONE 2015_05_19_214534_AlterTableComponentGroupsAddOrder .............. 45ms DONE 2015_05_20_073041_AlterTableIncidentsAddVisibileColumn ........... 63ms DONE 2015_06_10_122216_AlterTableComponentsDropUserIdColumn ........... 36ms DONE 2015_06_10_122229_AlterTableIncidentsDropUserIdColumn ............ 40ms DONE 2015_08_02_120436_AlterTableSubscribersRemoveDeletedAt ........... 28ms DONE 2015_08_13_214123_AlterTableMetricsAddDecimalPlacesColumn ........ 37ms DONE 2015_10_31_211944_CreateInvitesTable ............................. 36ms DONE 2015_11_03_211049_AlterTableComponentsAddEnabledColumn ........... 30ms DONE 2015_12_26_162258_AlterTableMetricsAddDefaultViewColumn .......... 21ms DONE 2016_01_09_141852_CreateSubscriptionsTable ....................... 37ms DONE 2016_01_29_154937_AlterTableComponentGroupsAddCollapsedColumn .... 16ms DONE 2016_02_18_085210_AlterTableMetricPointsChangeValueColumn ........ 95ms DONE 2016_03_01_174858_AlterTableMetricPointsAddCounterColumn ......... 46ms DONE 2016_03_08_125729_CreateIncidentUpdatesTable ..................... 49ms DONE 2016_03_10_144613_AlterTableComponentGroupsMakeColumnInteger ..... 73ms DONE 2016_04_05_142933_create_sessions_table ........................... 5ms FAIL

Illuminate\Database\QueryException

SQLSTATE[HY000]: General error: 3750 Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. (Connection: mysql, SQL: create table sessions (id varchar(255) not null, user_id int null, ip_address varchar(45) null, user_agent text null, payload text not null, last_activity int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:829 825▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 826▕ ); 827▕ } 828▕ ➜ 829▕ throw new QueryException( 830▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 831▕ ); 832▕ } 833▕ }

  +45 vendor frames 

46 artisan:35 Illuminate\Foundation\Console\Kernel::handle()

jbrooksuk commented 3 months ago

Thanks! I've updated this migration now and you should be good again.

kedesignzcom commented 3 months ago

@jbrooksuk Is there a new commit?

jbrooksuk commented 3 months ago

Yeah, there should be a migration change in the cachethq/core repository.