Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix SQLite issues once and for all, Setup pre-populated SQLite DB for…
… hands-free app installation

- SQLite does not like multiple dropColumns() in one Schema call (laravel/framework#2694)
- Update default SQLite server to 'sqlite'
- Update pre-seeded sqlite file with latest migrations
  • Loading branch information
GenPage committed Dec 24, 2014
1 parent 971e55e commit 7edc6f8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/config-sample/database.php
Expand Up @@ -26,7 +26,7 @@
|
*/

'default' => 'mysql',
'default' => 'sqlite',

/*
|--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions app/config-sample/local/database.php
Expand Up @@ -42,7 +42,7 @@
|
*/

'default' => 'mysql',
'default' => 'sqlite',

/*
|--------------------------------------------------------------------------
Expand All @@ -63,7 +63,7 @@

'sqlite' => array(
'driver' => 'sqlite',
'database' => 'solder',
'database' => __DIR__.'/../database/production.sqlite',
'prefix' => '',
),

Expand Down
Expand Up @@ -13,16 +13,24 @@ class NewPermissionSystem extends Migration {
public function up()
{
Schema::table('user_permissions', function($table) {
$table->dropColumn('solder_modpacks');
$table->dropColumn('solder_mods');
$table->dropColumn('solder_create');
});

Schema::table('user_permissions', function($table) {
$table->dropColumn('solder_mods');
});

Schema::table('user_permissions', function($table) {
$table->dropColumn('solder_modpacks');
});

Schema::table('user_permissions', function($table) {
$table->boolean('solder_keys')->default(0);
$table->boolean('solder_clients')->default(0);
$table->boolean('modpacks_create')->default(0);
$table->boolean('modpacks_manage')->default(0);
$table->boolean('modpacks_delete')->default(0);
});

}

/**
Expand All @@ -34,10 +42,25 @@ public function down()
{
Schema::table('user_permissions', function($table) {
$table->dropColumn('modpacks_delete');
});

Schema::table('user_permissions', function($table) {
$table->dropColumn('modpacks_manage');
});

Schema::table('user_permissions', function($table) {
$table->dropColumn('modpacks_create');
});

Schema::table('user_permissions', function($table) {
$table->dropColumn('solder_clients');
});

Schema::table('user_permissions', function($table) {
$table->dropColumn('solder_keys');
});

Schema::table('user_permissions', function($table) {
$table->boolean('solder_modpacks')->default(0);
$table->boolean('solder_mods')->default(0);
$table->boolean('solder_create')->default(0);
Expand Down
Binary file modified app/database/production.sqlite
Binary file not shown.

0 comments on commit 7edc6f8

Please sign in to comment.