Skip to content

Commit

Permalink
Refactored migration for compatibility with databases other than MySQL.
Browse files Browse the repository at this point in the history
Code provided by https://github.com/relu

Signed-off-by: William <[email protected]>
  • Loading branch information
William committed Oct 31, 2013
1 parent 11b2770 commit 1304843
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ public function up()
$table->boolean('unstable')->default('0');
$table->timestamps();
$table->foreign('language_id')->references('id')->on('languages');
$table->unique(array('language_id', 'namespace', 'group', 'item'));
});
// Unique index:
DB::statement('ALTER TABLE `language_entries` ADD UNIQUE INDEX(`language_id`, `namespace`, `group`, `item`)');
}

/**
Expand Down

0 comments on commit 1304843

Please sign in to comment.