diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-09-17 20:16:27 +0200 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-09-17 20:16:27 +0200 |
commit | d14392dea8bb3c3beb358a6132f919b04a2d73df (patch) | |
tree | 0f779814e3b0a4c8884ea74ac78654d04da0a4d5 | |
parent | f24442a1fb1be17daa4933e6d15765c0060913ab (diff) |
generate actor_id_prim
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r-- | lib/Migration/Version0002Date20190916000001.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Migration/Version0002Date20190916000001.php b/lib/Migration/Version0002Date20190916000001.php index df87a3fe..8e8e966c 100644 --- a/lib/Migration/Version0002Date20190916000001.php +++ b/lib/Migration/Version0002Date20190916000001.php @@ -84,6 +84,15 @@ class Version0002Date20190916000001 extends SimpleMigrationStep { ] ); } + if (!$table->hasColumn('actor_id_prim')) { + $table->addColumn( + 'actor_id_prim', 'string', + [ + 'notnull' => true, + 'length' => 128, + ] + ); + } if (!$schema->hasTable('social_a2_stream_dest')) { $table = $schema->createTable('social_a2_stream_dest'); @@ -165,6 +174,7 @@ class Version0002Date20190916000001 extends SimpleMigrationStep { $update = $this->connection->getQueryBuilder(); $update->update('social_a2_follows'); $update->set('follow_id_prim', $update->createNamedParameter(hash('sha512', $data['follow_id']))); + $update->set('actor_id_prim', $update->createNamedParameter(hash('sha512', $data['actor_id']))); $expr = $update->expr(); $update->where($expr->eq('id_prim', $update->createNamedParameter($data['id_prim']))); |