/** * Run the migrations. * * @return void */ public function up() { Schema::connection('mysql')->create('courses', function ($table) { $table->increments('id'); $table->string('title'); $table->text('description'); $table->longText('header'); $table->longText('address'); $table->date('start'); $table->date('end'); $table->integer('min'); $table->integer('max'); $table->longText('min_message'); $table->longText('max_message'); $table->integer('company_id'); $table->integer('category_id'); $table->integer('event_id'); $table->string('route'); $table->string('image'); $table->string('type'); $table->string('status'); $table->timestamps(); $table->softDeletes(); }); }
/** * Run the migrations. * * @return void */ public function up() { Schema::connection('mysql')->create('roles', function (Blueprint $table) { $table->increments('id'); $table->string('name'); }); }
/** * Run the migrations. * * @return void */ public function up() { // Schema::connection('mysql2')->table('pacientes', function ($table) { $table->timestamps(); }); }
/** * Run the migrations. * * @return void */ public function up() { /* We create the table more for testing reason, because every server should have a database */ if (!Schema::connection('player')->hasTable('player')) { DB::connection('player')->unprepared(file_get_contents(__DIR__ . '/sql/player.sql')); } }
/** * Reverse the migrations. * * @return void */ public function down() { //Remove the owner id as foreign key Schema::connection('store')->table('loadouts', function (Blueprint $table) { $table->dropForeign('owner_id'); }); }
public static function isExtensionDriverReady() { $driver = config('admin.extension_driver'); $connectionName = config('admin.extension_drivers.database.connection'); $migrationsTable = config('admin.migrations'); return $driver == 'file' || $driver == 'database' && \Schema::connection($connectionName)->hasTable($migrationsTable); }
/** * Reverse the migrations. * * @return void */ public function down() { Schema::connection('ff-mt-em')->dropIfExists('payments'); Schema::connection('ff-mt-em')->dropIfExists('terminals'); Schema::connection('ff-mt-em')->dropIfExists('cities'); Schema::connection('ff-mt-em')->dropIfExists('fee'); }
/** * Reverse the migrations. * * @return void */ public function down() { Schema::connection('account')->table('accounts', function (Blueprint $table) { $table->dropColumn('created_at'); $table->dropColumn('updated_at'); }); }
/** * Reverse the migrations. * * @return void */ public function down() { Schema::connection('webpanel')->drop('permission_role'); Schema::connection('webpanel')->drop('permissions'); Schema::connection('webpanel')->drop('role_user'); Schema::connection('webpanel')->drop('roles'); }
/** * Reverse the migrations. * * @return void */ public function down() { Schema::connection(DatabaseConnection::systemConnectionName())->table('ssl_hostnames', function (Blueprint $table) { // domain relation $table->bigInteger('hostname_id')->unsigned(); }); }
/** * Run the migrations. * * @return void */ public function up() { Schema::connection('mysql2')->create('estates', function (Blueprint $table) { $table->increments('id'); $table->string('title')->nullable(); $table->string('price')->nullable(); $table->string('price2')->nullable(); $table->string('metrs')->nullable(); $table->string('metrs2')->nullable(); $table->string('floor')->nullable(); $table->string('floors')->nullable(); $table->string('room')->nullable(); $table->string('adress')->nullable(); $table->string('rayon')->nullable(); $table->string('street')->nullable(); $table->string('dom')->nullable(); $table->string('date')->nullable(); $table->text('desc')->nullable(); $table->text('info')->nullable(); $table->boolean('active')->default(true); $table->timestamp('last_up')->nullable(); $table->timestamp('published_at')->nullable(); $table->boolean('published')->default(false); $table->timestamps(); }); }
/** * Reverse the migrations. * * @return void */ public function down() { //Delete the store_users_loadouts table Schema::connection('store')->drop('users_loadouts'); //Delete the privacy and owner_id column from the loadouts table Schema::connection('store')->table('loadouts', function (Blueprint $table) { $table->dropColumn('privacy'); $table->dropColumn('owner_id'); }); // Create the store_users_items_loadouts table Schema::connection('store')->create('users_items_loadouts', function (Blueprint $table) { $table->engine = "InnoDB"; $table->increments('id'); $table->integer('useritem_id')->unsigned(); $table->integer('loadout_id')->unsigned(); $table->timestamps(); $table->foreign('useritem_id')->references('id')->on('users_items')->onUpdate('cascade')->onDelete('cascade'); $table->foreign('loadout_id')->references('id')->on('loadouts')->onUpdate('cascade')->onDelete('cascade'); }); //Delete the store_items_loadouts table Schema::connection('store')->drop('items_loadouts'); //Delete the privacy and owner_id column from the loadouts table Schema::connection('store')->table('users', function (Blueprint $table) { $table->dropColumn('token'); $table->dropColumn('ip'); }); }
/** * Reverse the migrations. * * @return void */ public function down() { $builder = Schema::connection('mysql-chat'); $builder->drop('channels'); $builder->drop('messages'); $builder->drop('messages_private'); }
/** * Reverse the migrations. * * @return void */ public function down() { $builder = Schema::connection('mysql-chat'); $builder->table('channels', function ($table) { $table->dropColumn('moderated'); }); }
/** * Reverse the migrations. * * @return void */ public function down() { $connections = Config::get('database.connections'); foreach ($connections as $connection) { Schema::connection(self::$connection)->dropIfExists(self::$tableName); } }
/** * Reverse the migrations. * * @return void */ public function down() { Schema::connection('member')->table('tb_user', function (Blueprint $table) { $table->dropColumn('created_at'); $table->dropColumn('updated_at'); }); }
/** * Reverse the migrations. * * @return void */ public function down() { $builder = Schema::connection('mysql-mp'); $builder->drop('events'); $builder->drop('game_scores'); $builder->drop('games'); $builder->drop('matches'); }
/** * Run the migrations. * * @return void */ public function up() { // Schema::connection('mysql3')->table('ck_patient', function ($table) { $table->integer("contact_id"); $table->timestamps(); }); }
/** * Reverse the migrations. * * @return void */ public function down() { // If DB file exists delete it if (Storage::exists(database_path('SPGProfileDB.sqlite'))) { Storage::delete(database_path('SPGProfileDB.sqlite')); } Schema::connection($this->TargetDB)->drop('pass_profiles'); }
/** * Run the migrations. * * @return void */ public function up() { Schema::connection('work')->create('password_resets', function (Blueprint $table) { $table->string('email')->index(); $table->string('token')->index(); $table->timestamp('created_at'); }); }
/** * Reverse the migrations. * * @return void */ public function down() { //Remove the owner id as foreign key Schema::connection('store')->table('users', function (Blueprint $table) { $table->dropForeign('eqp_loadout_id'); $table->dropColumn('eqp_loadout_id'); }); }
/** * Run the migrations. * * @return void */ public function up() { Schema::connection('mysql')->create('product_order_dates', function (Blueprint $table) { $table->increments('id'); $table->date('order_date'); $table->timestamps(); }); }
/** * Run the migrations. * * @return void */ public function up() { Schema::connection('mysql')->create('product_statuses', function (Blueprint $table) { $table->increments('id'); $table->text('description'); $table->timestamps(); }); }
/** * Reverse the migrations. * * @return void */ public function down() { Schema::connection('ff-actions-calc')->table('rules', function (Blueprint $table) { $table->dropColumn('signal_sid'); }); Schema::connection('ff-actions-calc')->table('rules', function (Blueprint $table) { $table->string('signal_sid'); }); }
/** * Reverse the migrations. * * @return void */ public function down() { Schema::connection('mysql')->drop('categories'); Schema::connection('mysql')->drop('reports'); Schema::drop('user_accounts'); Schema::drop('users'); Schema::drop('chats'); Schema::drop('products'); }
/** * Run the migrations. * * @return void */ public function up() { Schema::connection('pgsql')->create('branches', function (Blueprint $table) { $table->increments('id'); $table->text('name'); $table->text('address'); $table->timestamps(); }); }
/** * Run the migrations. * * @return void */ public function up() { Schema::connection('mysql')->create('users', function (Blueprint $table) { $table->increments('id'); $table->string('email')->unique(); $table->string('password', 60); $table->rememberToken(); $table->timestamps(); }); }
public function testMigratorUsesSpecificDatabaseConnection() { $this->executeDefaultMigration(array('--database' => 'artisantest_custom_two')); $this->resetLaravelPaths(); $this->assertTrue(Schema::connection('artisantest_custom_two')->hasTable('test_tbl')); $this->assertFalse(Schema::connection('artisantest_default')->hasTable('test_tbl')); $this->assertFalse(Schema::connection('artisantest_custom')->hasTable('test_tbl')); $entry = $this->app['db']->connection('artisantest_custom_two')->table('test_tbl')->where('id', 1)->first(); $this->assertEquals($this->testType, $entry->test_val); }
/** * Run the migrations. * * @return void */ public function up() { Schema::connection(env('DB_CONNECTION_PERSON', 'mysql_hr_persons'))->create('person_documents', function (Blueprint $table) { $table->increments('id'); $table->integer('person_id')->unsigned()->index(); $table->json('documents'); $table->timestamps(); $table->softDeletes(); }); }
/** * Run the migrations. * * @return void */ public function up() { Schema::connection('mysql')->create('users_roles', function (Blueprint $table) { $table->integer('user_id')->unsigned()->index(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->integer('role_id')->unsigned()->index(); $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade'); $table->timestamps(); }); }