fix updating the db row due to lacking id col

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2018-06-28 21:58:54 +02:00 committed by Morris Jobke
parent 4e073010df
commit 89c3010d14
No known key found for this signature in database
GPG key ID: FE03C3A163FEDE68

View file

@ -33,6 +33,12 @@ class Version14000Date20180626223656 extends SimpleMigrationStep {
$schema = $schemaClosure();
if(!$schema->hasTable('whats_new')) {
$table = $schema->createTable('whats_new');
$table->addColumn('id', 'integer', [
'autoincrement' => true,
'notnull' => true,
'length' => 4,
'unsigned' => true,
]);
$table->addColumn('version', 'string', [
'notnull' => true,
'length' => 64,
@ -53,7 +59,8 @@ class Version14000Date20180626223656 extends SimpleMigrationStep {
'notnull' => true,
'default' => '',
]);
$table->setPrimaryKey(['version']);
$table->setPrimaryKey(['id']);
$table->addUniqueIndex(['version']);
$table->addIndex(['version', 'etag'], 'version_etag_idx');
}