fixed multiple select component

This commit is contained in:
Jonathan Labreuille
2015-10-09 14:48:54 +02:00
parent be2c35c13e
commit ed9407a890
7 changed files with 102 additions and 65 deletions

View File

@ -116,7 +116,8 @@ class Migrator {
'segment_id mediumint(9) NOT NULL,',
'created_at TIMESTAMP NOT NULL DEFAULT 0,',
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
'PRIMARY KEY (id)'
'PRIMARY KEY (id)',
'UNIQUE KEY subscriber_segment (subscriber_id, segment_id)'
);
return $this->sqlify(__FUNCTION__, $attributes);
}
@ -128,7 +129,8 @@ class Migrator {
'segment_id mediumint(9) NOT NULL,',
'created_at TIMESTAMP NOT NULL DEFAULT 0,',
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
'PRIMARY KEY (id)'
'PRIMARY KEY (id)',
'UNIQUE KEY newsletter_segment (newsletter_id, segment_id)'
);
return $this->sqlify(__FUNCTION__, $attributes);
}