Execute the migrations queries.
14602
final public function execute()
    {
        $platform = $this->connection->getDatabasePlatform();
        $queries  = $this->currentSchema->getMigrateToSql($this->schema, $platform);

        foreach ($queries as $query) {
            $this->connection->query($query);
        }
    }
250402
public function up()
    {
        Schema::create('menu__menus', function (Blueprint $table) {
            $table->increments('id');

            $table->string('name');
            $table->string('url')->nullable();

            $table->string('attribute_target')->nullable();
            $table->string('attribute_id')->nullable();
            $table->string('attribute_class')->nullable();

            $table->boolean('active')->default(false);
            $table->boolean('useSubject')->default(false);

            $table->integer('subject_id')->nullable()->index();
            $table->string('subject_type')->nullable()->index();

            NestedSet::columns($table);
            $table->timestamps();

            $table->engine = 'InnoDB';
        });
    }
198155
public function up() {
        Schema::create('languages', function (Blueprint $table) {
            $table->increments('id');
            $table->char('slug', 2)->unique();
            $table->string('title', 30);
            $table->tinyInteger('rank')->unsigned()->default(1);
            $table->boolean('active')->default(1);

            $table->index('active');
            $table->index('rank');
        });
    }
1108754
public function up()
    {
        Schema::create('scaffoldinterfaces', function (Blueprint $table) {
            $table->increments('id')->unsigned();
            $table->String('package');
            $table->String('migration');
            $table->String('model');
            $table->String('controller');
            $table->String('views');
            $table->String('tablename');
            $table->timestamps();
        });
        Schema::create('relations', function (Blueprint $table) {
            $table->increments('id')->unsigned();
            $table->integer('scaffoldinterface_id')->unsigned();
            $table->String('to');
            $table->String('having');
            $table->foreign('scaffoldinterface_id')->references('id')->on('scaffoldinterfaces')->onDelete('cascade');
            $table->timestamps();
        });
    }
968668
public function up()
    {
        Schema::table('notifications', function ($table) {
            $driver = Config::get('database.driver');

            if ($driver === 'mysql' || $driver === 'sqlite') {
                DB::statement('ALTER TABLE notifications MODIFY COLUMN extra json');
            } elseif ($driver === 'pgsql') {
                DB::statement('ALTER TABLE notifications ALTER COLUMN extra TYPE json USING code::string');
            }
        });
    }
662807
public function up()
    {
        Schema::create('api_keys', function (Blueprint $table) {
            $table->increments('id');
            $table->nullableMorphs('apikeyable');
            $table->string('key', 50);
            $table->string('last_ip_address', 50)->nullable();
            $table->dateTime('last_used_at')->nullable();
            $table->nullableTimestamps();
            $table->softDeletes();

            $table->index('key');
        });
    }
597584
public function up(): void
    {
        Schema::create(config('queue.connections.database.table'), function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('queue');
            $table->longText('payload');
            $table->tinyInteger('attempts')->unsigned();
            $table->integer('reserved_at')->unsigned()->nullable();
            $table->integer('available_at')->unsigned();
            $table->integer('created_at')->unsigned();

            // Indexes
            $table->index('queue');
        });
    }
1018413
public function up()
	{
        // Add column "active" if NOT exist
        if (!Schema::hasColumn('pricelists', 'active')) {
            Schema::table('pricelists', function(Blueprint $table)
            {
                $table->boolean('active')->default(true);
            });
        }
	}
703276
public function up()
    {
        Schema::create( 'admin_activations', function ( Blueprint $table )
        {
            $table->increments( 'id' );
            $table->integer( 'user_id' )->unsigned();
            $table->string( 'code' );
            $table->boolean( 'completed' )->default( 0 );
            $table->timestamp( 'completed_at' )->nullable();
            $table->timestamps();

            $table->engine = 'InnoDB';
        } );

        Schema::create( 'admin_persistences', function ( Blueprint $table )
        {
            $table->increments( 'id' );
            $table->integer( 'user_id' )->unsigned();
            $table->string( 'code' );
            $table->timestamps();

            $table->engine = 'InnoDB';
            $table->unique( 'code' );
        } );

        Schema::create( 'admin_reminders', function ( Blueprint $table )
        {
            $table->increments( 'id' );
            $table->integer( 'user_id' )->unsigned();
            $table->string( 'code' );
            $table->boolean( 'completed' )->default( 0 );
            $table->timestamp( 'completed_at' )->nullable();
            $table->timestamps();

            $table->engine = 'InnoDB';
        } );

        Schema::create( 'admin_roles', function ( Blueprint $table )
        {
            $table->increments( 'id' );
            $table->string( 'slug' );
            $table->string( 'name' );
            $table->text( 'permissions' )->nullable();
            $table->timestamps();

            $table->engine = 'InnoDB';
            $table->unique( 'slug' );
        } );

        Schema::create( 'admin_role_users', function ( Blueprint $table )
        {
            $table->integer( 'user_id' )->unsigned();
            $table->integer( 'role_id' )->unsigned();
            $table->nullableTimestamps();

            $table->engine = 'InnoDB';
            $table->primary( [ 'user_id', 'role_id' ] );
        } );

        Schema::create( 'admin_throttle', function ( Blueprint $table )
        {
            $table->increments( 'id' );
            $table->integer( 'user_id' )->unsigned()->nullable();
            $table->string( 'type' );
            $table->string( 'ip' )->nullable();
            $table->timestamps();

            $table->engine = 'InnoDB';
            $table->index( 'user_id' );
        } );

        Schema::create( 'admin_users', function ( Blueprint $table )
        {
            $table->increments( 'id' );
            $table->string( 'email' );
            $table->string( 'password' );
            $table->text( 'permissions' )->nullable();
            $table->timestamp( 'last_login' )->nullable();
            $table->string( 'first_name' )->nullable();
            $table->string( 'last_name' )->nullable();
            $table->timestamps();

            $table->engine = 'InnoDB';
            $table->unique( 'email' );
        } );
    }
499124
def execute(self, i, o):
        
        super(StatusCommand, self).execute(i, o)

        database = i.get_option('database')
        repository = DatabaseMigrationRepository(self._resolver, 'migrations')

        migrator = Migrator(repository, self._resolver)

        if not migrator.repository_exists():
            return o.writeln('<error>No migrations found</error>')

        self._prepare_database(migrator, database, i, o)

        path = i.get_option('path')

        if path is None:
            path = self._get_migration_path()

        ran = migrator.get_repository().get_ran()

        migrations = []
        for migration in migrator._get_migration_files(path):
            if migration in ran:
                migrations.append(['<fg=cyan>%s</>' % migration, '<info>Yes</info>'])
            else:
                migrations.append(['<fg=cyan>%s</>' % migration, '<fg=red>No</>'])

        if migrations:
            table = self.get_helper('table')
            table.set_headers(['Migration', 'Ran?'])
            table.set_rows(migrations)
            table.render(o)
        else:
            return o.writeln('<error>No migrations found</error>')

        for note in migrator.get_notes():
            o.writeln(note)
134188
public function up()
    {
        // We need a better way of handling data migrations...
        $system = app(System::class);
        $prefix = $system->getTablePrefix();
        DB::update("INSERT INTO {$prefix}schedules (name, message, scheduled_at, created_at, updated_at) SELECT name, message, scheduled_at, created_at, updated_at FROM {$prefix}incidents WHERE scheduled_at IS NOT NULL");

        DB::table('incidents')->whereNotNull('scheduled_at')->delete();

        Schema::table('incidents', function (Blueprint $table) {
            $table->dropColumn('scheduled_at');
        });
    }
233924
public function exec()
    {
        $schema = $this->argument('schema');

        $process = Migrations::exec($schema);
        //
        $this->show($process);
        $this->backup($process);
    }
1195178
public function up()
    {
        $this->createSchema(function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('domain_id')->index();
            $table->string('url')->index();
            $table->string('host');
            $table->string('medium')->nullable()->index();
            $table->string('source')->nullable()->index();
            $table->string('search_terms_hash')->nullable()->index();
            $table->timestamp('created_at')->index();
            $table->timestamp('updated_at')->index();
        });
    }
186444
public function up()
    {
        $record = new MigrationRecord();
        if ($this->connection !== null) {
            $record->setConnection($this->connection);
        }
        $record->migration = $this->name;
        $record->save();
    }
488754
public function migrate()
    {
        $fs = new Filesystem;
        $finder = new ClassFinder;
        $path = env('MIGRATIONS_PATH', 'database/migrations');

        if ($fs->exists($path)) {
            foreach ($fs->files($path) as $file) {
                $fs->requireOnce($file);
                $class = $finder->findClass($file);

                (new $class)->up();
            }
        }
    }
945587
public function migrate()
	{
		$table = 'fe_users';
		$column = 'siteid';

		$this->msg( sprintf( 'Adding "%1$s" column to "%2$s" table', $column, $table ), 0 );

		$schema = $this->getSchema( 'db-customer' );

		if( isset( $this->migrate[$schema->getName()] )
			&& $schema->tableExists( $table ) === true
			&& $schema->columnExists( $table, $column ) === false )
		{
			foreach ( $this->migrate[$schema->getName()] as $stmt )
			{
				$this->execute( $stmt );
			}
			$this->status( 'done' );
		}
		else
		{
			$this->status( 'OK' );
		}
	}
1060081
public function up() {
		$db = Database::get();
		$result = $db->get_row('show table status where NAME="file"', []);

		if (isset($result['engine']) and $result['engine'] == 'InnoDB') {
			return;
		}
	
		if (isset($result['Engine']) and $result['Engine'] == 'InnoDB') {
            		return;
        	}

		$db->query("
			ALTER TABLE `file` ENGINE='InnoDB';
		", []);
	}