-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Language entries may be locked, disallowing further edits unless forced.
Signed-off-by: William <[email protected]>
- Loading branch information
William
committed
Oct 25, 2013
1 parent
adf8193
commit 11b2770
Showing
3 changed files
with
47 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/migrations/2013_10_25_180009_rename_overwrite_to_locked.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class RenameOverwriteToLocked extends Migration { | ||
|
||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('language_entries', function($table){ | ||
$table->boolean('locked')->after('unstable')->default(0); | ||
}); | ||
// Change the sign of locked for all entries that do not allow overwrite: | ||
DB::table('language_entries')->where('overwrite', '0')->update(array('locked' => '1')); | ||
Schema::table('language_entries', function($table){ | ||
$table->dropColumn('overwrite'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
// | ||
} | ||
|
||
} |