Skip to content

Commit

Permalink
DP-153 Microsoft SQL Server cannot be used for system database
Browse files Browse the repository at this point in the history
- Fix migrations rollback
  • Loading branch information
yaroslavmo committed Feb 20, 2020
1 parent 1f135c3 commit e3f0f6a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
22 changes: 10 additions & 12 deletions database/migrations/2015_01_27_190908_create_system_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,30 +330,28 @@ public function down()
Schema::dropIfExists('system_custom');
// System Configuration
Schema::dropIfExists('system_config');
// File storage, public path designation
Schema::dropIfExists('file_service_config');
// Cache-able service configuration
Schema::dropIfExists('service_cache_config');
// File storage, public path designation
Schema::dropIfExists('file_service_config');
// JSON Web Token to system resources map
Schema::dropIfExists('token_map');
// App relationship for user
Schema::dropIfExists('user_to_app_to_role');
// Service Docs
Schema::dropIfExists('service_doc');
// Applications
Schema::dropIfExists('app');
//Cors config table
Schema::dropIfExists('cors_config');
// Email Templates
Schema::dropIfExists('email_template');
// Role Service Accesses
Schema::dropIfExists('role_service_access');
// Roles
Schema::dropIfExists('role');
// Email Templates
Schema::dropIfExists('email_template');
// Service Docs
Schema::dropIfExists('service_doc');
// Services
Schema::dropIfExists('service');
//Cors config table
Schema::dropIfExists('cors_config');
// App relationship for user
Schema::dropIfExists('user_to_app_role');
// Applications
Schema::dropIfExists('app');
//Password reset
Schema::dropIfExists('password_resets');
// User table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function up()
*/
public function down()
{
if (!Schema::hasColumn('jobs', 'reserved')) {
if (DB::getDriverName() !== 'sqlite' && !Schema::hasColumn('jobs', 'reserved')) {
Schema::table('jobs', function (Blueprint $table) {
$table->tinyInteger('reserved')->unsigned();
});
Expand Down

0 comments on commit e3f0f6a

Please sign in to comment.