Skip to content
Snippets Groups Projects
Commit e726d4f8 authored by Moritz Strohm's avatar Moritz Strohm
Browse files

migration 1.254: delete all data from opengraphdata table before altering it, fixes #1445

Closes #1445

Merge request studip/studip!899
parent a91ff5dd
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,10 @@ class HashOpengraphTable extends Migration
{
public function up()
{
//Prevent duplicate entries in one of the following queries
//by deleting all entries in the opengraphdata table:
DBManager::get()->exec("DELETE FROM `opengraphdata`");
$query = "ALTER TABLE `opengraphdata`
ADD COLUMN `hash` CHAR(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' AFTER `opengraph_id`";
DBManager::get()->exec($query);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment