Run package database migrations.

@return void
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();
            }
        }
    }
212922
public function up()
    {
        Schema::create(config('settings.table', 'settings'), function (Blueprint $table) {
            $table->increments('id');
            $table->string('code')->unique()->index();
            $table->enum('type', ['BOOLEAN', 'NUMBER', 'DATE', 'TEXT', 'SELECT', 'FILE', 'TEXTAREA']);
            $table->string('label');
            $table->longText('value')->nullable();
            $table->boolean('hidden');
            $table->timestamps();
        });
    }
1288956
public function up()
    {
        // Create table for storing roles
        Schema::create('data_types', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->unique();
            $table->string('slug')->unique();
            $table->string('display_name_singular');
            $table->string('display_name_plural');
            $table->string('icon')->nullable();
            $table->string('model_name')->nullable();
            $table->string('description')->nullable();
            $table->boolean('generate_permissions')->default(false);
            $table->timestamps();
        });

        // Create table for storing roles
        Schema::create('data_rows', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('data_type_id')->unsigned();
            $table->string('field');
            $table->string('type');
            $table->string('display_name')->nullable();
            $table->boolean('required')->default(false);
            $table->boolean('browse')->default(true);
            $table->boolean('read')->default(true);
            $table->boolean('edit')->default(true);
            $table->boolean('add')->default(true);
            $table->boolean('delete')->default(true);
            $table->text('details')->nullable();

            $table->foreign('data_type_id')->references('id')->on('data_types')
                ->onUpdate('cascade')->onDelete('cascade');
        });
    }
993666
public function up()
    {
        Schema::create('FILE_File', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name' , 100);
            $table->char('type' , 1);
            $table->string('system_type', 100)->nullable();
            $table->string('system_route')->nullable();
            $table->text('url')->nullable();
            $table->text('url_html')->nullable();
            $table->boolean('is_public')->default(false);
            $table->string('key')->nullable();
            $table->string('icon' , 20)->nullable();
            $table->string('icon_html')->nullable();
            $table->float('width')->nullable();
            $table->float('height')->nullable();
            $table->unsignedInteger('parent_file_id')->nullable();
            $table->string('system_reference_type' , 40)->nullable();
            $table->unsignedInteger('system_reference_id')->nullable();

            //Foreign Keys
            $table->unsignedInteger('organization_id');

            //Timestamps
      			$table->timestamps(); //Adds created_at and updated_at columns
      			$table->softDeletes(); //Adds deleted_at column for soft deletes
        });

        Schema::table('FILE_File', function(Blueprint $table)
        {
          //Foreign Key
          $table->foreign('parent_file_id')->references('id')->on('FILE_File');
        });
    }
1107875
public function up()
    {
        $table = $this->table('users');

        if (!$table->hasColumn('firstname')) {
            $table->addColumn('firstname', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'after' => 'language_id']);
        }

        if (!$table->hasColumn('lastname')) {
            $table->addColumn('lastname', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'after' => 'firstname']);
        }

        $table->update();

        $this->clearModelCache();
    }
868907
public function up()
    {
        Schema::create(
            'users',
            function (Blueprint $table) {
                $table->increments('id');
                $table->string('email')->unique();
                $table->string('password');
                $table->string('name')->unique()->nullable();
                $table->string('first_name')->nullable();
                $table->string('last_name')->nullable();
                $table->boolean('is_admin')->default(false);
                $table->rememberToken();
                $table->timestamps();
            }
        );

        // Seed users
        $this->seedUsers();
    }
1066193
public function up()
    {
        $connection = config('admin.database.connection') ?: config('database.default');

        $table = config('admin.extensions.reporter.table', 'laravel_exceptions');

        Schema::connection($connection)->create($table, function (Blueprint $table) {
            $table->increments('id');
            $table->string('type');
            $table->string('code');
            $table->string('message');
            $table->string('file');
            $table->integer('line');
            $table->text('trace');
            $table->string('method');
            $table->string('path');
            $table->text('query');
            $table->text('body');
            $table->text('cookies');
            $table->text('headers');
            $table->string('ip');
            $table->timestamps();
        });
    }
540348
public function up()
    {
        Schema::table('assets', function (Blueprint $table) {
            $table->timestamp('published_at')->useCurrent();
            $table->index('published_at');
        });

        DB::statement('update assets set published_at = from_unixtime(created_at)');
    }
301011
public function up()
    {
        Schema::create('translator_translations', function ($table) {
            $table->increments('id');
            $table->string('locale', 6);
            $table->string('namespace')->default('*');
            $table->string('group');
            $table->string('item');
            $table->text('text');
            $table->boolean('unstable')->default(false);
            $table->boolean('locked')->default(false);
            $table->timestamps();
            $table->foreign('locale')->references('locale')->on('translator_languages');
            $table->unique(['locale', 'namespace', 'group', 'item']);
        });
    }
594197
public function up()
    {
        Schema::table('user_addresses', function (Blueprint $table) {
            $table->string('uid', 32)->unique();
            $table->string('phone_work')->nullable();
            $table->string('phone_home')->nullable();
            $table->string('phone_mobile')->nullable();
            $table->text('other_informations')->nullable();

            DB::statement('ALTER TABLE `user_addresses` MODIFY `address2` VARCHAR(255) NULL;');
        });

        Schema::table('order_addresses', function (Blueprint $table) {
            $table->string('uid', 32)->unique();
            $table->string('phone_work')->nullable();
            $table->string('phone_home')->nullable();
            $table->string('phone_mobile')->nullable();
            $table->text('other_informations')->nullable();

            DB::statement('ALTER TABLE `user_addresses` MODIFY `address2` VARCHAR(255) NULL;');
        });

        Schema::table('products', function (Blueprint $table) {
            $table->softDeletes();
        });
    }
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';
		", []);
	}
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();
        });
    }
473068
public function up()
    {
        $file = dirname($this->getIdentifier()->filepath).'/'.$this->getVersion().'.sql';
        if (file_exists($file)) {
            dbexecfile($file);
        }
    }
155076
public function up()
    {
        Schema::connection($this->connection)->create('provider', function (Blueprint $table) {
            $table->increments('id', true);
            $table->string('firstname');
            $table->string('lastname');
            $table->string('practice_name');
            $table->string('address');
            $table->string('town');
            $table->string('state')->nullable();
            $table->string('country')->nullable();
            $table->string('email')->nullable();
        });
    }
439111
public function up()
    {
    	Schema::create('SL_Databases', function(Blueprint $table)
		{
			$table->increments('DbID');
			$table->integer('DbUser')->unsigned()->nullable();
			$table->string('DbPrefix', 25)->nullable();
			$table->string('DbName')->nullable();
			$table->longText('DbDesc')->nullable();
			$table->longText('DbMission')->nullable();
			$table->integer('DbOpts')->default('1')->nullable();
			$table->integer('DbTables')->default('0')->nullable();
			$table->integer('DbFields')->default('0')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Tables', function(Blueprint $table)
		{
			$table->increments('TblID');
			$table->integer('TblDatabase')->unsigned()->nullable();
			$table->string('TblAbbr')->nullable();
			$table->string('TblName')->nullable();
			$table->string('TblEng')->nullable();
			$table->longText('TblDesc')->nullable();
			$table->longText('TblNotes')->nullable();
			$table->string('TblType', 25)->default('Data')->nullable();
			$table->string('TblGroup', 50)->nullable();
			$table->integer('TblOrd')->default('0')->nullable();
			$table->integer('TblOpts')->default('1')->nullable();
			$table->integer('TblExtend')->unsigned()->default('0')->nullable();
			$table->integer('TblNumFields')->default('0')->nullable();
			$table->integer('TblNumForeignKeys')->default('0')->nullable();
			$table->integer('TblNumForeignIn')->default('0')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Fields', function(Blueprint $table)
		{
			$table->increments('FldID');
			$table->integer('FldDatabase')->unsigned()->nullable();
			$table->integer('FldTable')->unsigned()->nullable();
			$table->integer('FldOrd')->default('0')->nullable();
			$table->string('FldSpecType', 10)->default('Unique')->nullable();
			$table->integer('FldSpecSource')->default('-3')->nullable();
			$table->string('FldName')->nullable();
			$table->string('FldEng')->nullable();
			$table->string('FldAlias')->nullable();
			$table->longText('FldDesc')->nullable();
			$table->longText('FldNotes')->nullable();
			$table->integer('FldForeignTable')->default('-3')->nullable();
			$table->string('FldForeignMin', 11)->default('1')->nullable();
			$table->string('FldForeignMax', 11)->default('1')->nullable();
			$table->string('FldForeign2Min', 11)->default('1')->nullable();
			$table->string('FldForeign2Max', 11)->default('1')->nullable();
			$table->longText('FldValues')->nullable();
			$table->string('FldDefault')->nullable();
			$table->boolean('FldIsIndex')->default('0')->nullable();
			$table->string('FldType', 25)->default('VARCHAR')->nullable();
			$table->string('FldDataType', 20)->default('Alphanumeric')->nullable();
			$table->integer('FldDataLength')->nullable();
			$table->integer('FldDataDecimals')->default('0')->nullable();
			$table->string('FldCharSupport')->default(',Letters,Numbers,Keyboard,Special,')->nullable();
			$table->string('FldInputMask')->nullable();
			$table->string('FldDisplayFormat')->nullable();
			$table->string('FldKeyType')->default(',Non,')->nullable();
			$table->string('FldKeyStruct', 10)->nullable();
			$table->string('FldEditRule', 10)->default('LateAllow')->nullable();
			$table->boolean('FldUnique')->default('0')->nullable();
			$table->boolean('FldNullSupport')->default('1')->nullable();
			$table->string('FldValuesEnteredBy', 10)->default('User')->nullable();
			$table->boolean('FldRequired')->default('0')->nullable();
			$table->integer('FldCompareSame')->default('1')->nullable();
			$table->integer('FldCompareOther')->default('1')->nullable();
			$table->integer('FldCompareValue')->default('1')->nullable();
			$table->integer('FldOperateSame')->default('1')->nullable();
			$table->integer('FldOperateOther')->default('1')->nullable();
			$table->integer('FldOperateValue')->default('1')->nullable();
			$table->integer('FldOpts')->default('1')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Definitions', function(Blueprint $table)
		{
			$table->increments('DefID');
			$table->integer('DefDatabase')->unsigned()->nullable();
			$table->string('DefSet', 20)->default('Value Ranges')->nullable();
			$table->string('DefSubset', 50)->nullable();
			$table->integer('DefOrder')->default('0')->nullable();
			$table->boolean('DefIsActive')->default('1')->nullable();
			$table->string('DefValue')->nullable();
			$table->longText('DefDescription')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_BusRules', function(Blueprint $table)
		{
			$table->increments('RuleID');
			$table->integer('RuleDatabase')->unsigned()->nullable();
			$table->longText('RuleStatement')->nullable();
			$table->longText('RuleConstraint')->nullable();
			$table->string('RuleTables')->default(',')->nullable();
			$table->string('RuleFields')->default(',')->nullable();
			$table->boolean('RuleIsAppOrient')->default('1')->nullable();
			$table->boolean('RuleIsRelation')->default('1')->nullable();
			$table->string('RuleTestOn', 10)->default('Insert')->nullable();
			$table->integer('RulePhys')->default('1')->nullable();
			$table->integer('RuleLogic')->default('1')->nullable();
			$table->integer('RuleRel')->default('1')->nullable();
			$table->longText('RuleAction')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Tree', function(Blueprint $table)
		{
			$table->increments('TreeID');
			$table->integer('TreeDatabase')->unsigned()->nullable();
			$table->integer('TreeUser')->unsigned()->nullable();
			$table->string('TreeType', 30)->default('Primary Public')->nullable();
			$table->string('TreeName')->nullable();
			$table->longText('TreeDesc')->nullable();
			$table->string('TreeSlug')->nullable();
			$table->integer('TreeRoot')->unsigned()->nullable();
			$table->integer('TreeFirstPage')->unsigned()->nullable();
			$table->integer('TreeLastPage')->unsigned()->nullable();
			$table->integer('TreeCoreTable')->unsigned()->nullable();
			$table->integer('TreeOpts')->default('1')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Node', function(Blueprint $table)
		{
			$table->increments('NodeID');
			$table->integer('NodeTree')->unsigned()->nullable();
			$table->integer('NodeParentID')->default('-3')->nullable();
			$table->integer('NodeParentOrder')->default('0')->nullable();
			$table->string('NodeType', 25)->nullable();
			$table->longText('NodePromptText')->nullable();
			$table->longText('NodePromptNotes')->nullable();
			$table->longText('NodePromptAfter')->nullable();
			$table->longText('NodeInternalNotes')->nullable();
			$table->string('NodeResponseSet', 50)->nullable();
			$table->string('NodeDefault')->nullable();
			$table->string('NodeDataBranch', 100)->nullable();
			$table->string('NodeDataStore', 100)->nullable();
			$table->string('NodeTextSuggest', 100)->nullable();
			$table->integer('NodeCharLimit')->default('0')->nullable();
			$table->integer('NodeLikes')->default('0')->nullable();
			$table->integer('NodeDislikes')->default('0')->nullable();
			$table->integer('NodeOpts')->default('1')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_NodeResponses', function(Blueprint $table)
		{
			$table->increments('NodeResID');
			$table->integer('NodeResNode')->unsigned()->nullable();
			$table->integer('NodeResOrd')->default('0')->nullable();
			$table->longText('NodeResEng')->nullable();
			$table->string('NodeResValue')->nullable();
			$table->integer('NodeResShowKids')->default('0')->nullable();
			$table->integer('NodeResMutEx')->default('0')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Conditions', function(Blueprint $table)
		{
			$table->increments('CondID');
			$table->integer('CondDatabase')->unsigned()->nullable();
			$table->string('CondTag', 100)->nullable();
			$table->longText('CondDesc')->nullable();
			$table->string('CondOperator', 50)->default('{')->nullable();
			$table->string('CondOperDeet', 100)->nullable();
			$table->integer('CondField')->unsigned()->nullable();
			$table->integer('CondTable')->unsigned()->nullable();
			$table->integer('CondLoop')->unsigned()->nullable();
			$table->integer('CondOpts')->default('1')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_ConditionsVals', function(Blueprint $table)
		{
			$table->increments('CondValID');
			$table->integer('CondValCondID')->unsigned()->nullable();
			$table->string('CondValValue')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_ConditionsNodes', function(Blueprint $table)
		{
			$table->increments('CondNodeID');
			$table->integer('CondNodeCondID')->unsigned()->nullable();
			$table->integer('CondNodeNodeID')->nullable();
			$table->integer('CondNodeLoopID')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_ConditionsArticles', function(Blueprint $table)
		{
			$table->increments('ArticleID');
			$table->integer('ArticleCondID')->unsigned()->nullable();
			$table->string('ArticleURL')->nullable();
			$table->string('ArticleTitle')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_DataLoop', function(Blueprint $table)
		{
			$table->increments('DataLoopID');
			$table->integer('DataLoopTree')->unsigned()->nullable();
			$table->integer('DataLoopRoot')->unsigned()->nullable();
			$table->string('DataLoopPlural', 50)->nullable();
			$table->string('DataLoopSingular', 50)->nullable();
			$table->string('DataLoopTable', 100)->nullable();
			$table->string('DataLoopSortFld', 100)->nullable();
			$table->string('DataLoopDoneFld', 100)->nullable();
			$table->integer('DataLoopMaxLimit')->default('0')->nullable();
			$table->integer('DataLoopWarnLimit')->default('0')->nullable();
			$table->integer('DataLoopMinLimit')->default('0')->nullable();
			$table->boolean('DataLoopIsStep')->default('0')->nullable();
			$table->boolean('DataLoopAutoGen')->default('1')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_DataSubsets', function(Blueprint $table)
		{
			$table->increments('DataSubID');
			$table->integer('DataSubTree')->unsigned()->nullable();
			$table->string('DataSubTbl', 100)->nullable();
			$table->string('DataSubTblLnk', 100)->nullable();
			$table->string('DataSubSubTbl', 50)->nullable();
			$table->string('DataSubSubLnk', 100)->nullable();
			$table->boolean('DataSubAutoGen')->default('0')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_DataHelpers', function(Blueprint $table)
		{
			$table->increments('DataHelpID');
			$table->integer('DataHelpTree')->unsigned()->nullable();
			$table->string('DataHelpParentTable', 50)->nullable();
			$table->string('DataHelpTable', 50)->nullable();
			$table->string('DataHelpKeyField', 50)->nullable();
			$table->string('DataHelpValueField', 50)->nullable();
			$table->timestamps();
		});
		Schema::create('SL_DataLinks', function(Blueprint $table)
		{
			$table->increments('DataLinkID');
			$table->integer('DataLinkTree')->unsigned()->nullable();
			$table->integer('DataLinkTable')->unsigned()->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Images', function(Blueprint $table)
		{
			$table->increments('ImgID');
			$table->integer('ImgDatabaseID')->unsigned()->nullable();
			$table->integer('ImgUserID')->unsigned()->nullable();
			$table->string('ImgFileOrig')->nullable();
			$table->string('ImgFileLoc')->nullable();
			$table->string('ImgFullFilename')->nullable();
			$table->string('ImgTitle')->nullable();
			$table->string('ImgCredit')->nullable();
			$table->string('ImgCreditUrl')->nullable();
			$table->integer('ImgNodeID')->unsigned()->nullable();
			$table->string('ImgType', 10)->nullable();
			$table->integer('ImgFileSize')->nullable();
			$table->integer('ImgWidth')->nullable();
			$table->integer('ImgHeight')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_SearchRecDump', function(Blueprint $table)
		{
			$table->increments('SchRecDmpID');
			$table->integer('SchRecDmpTreeID')->unsigned()->nullable();
			$table->integer('SchRecDmpRecID')->nullable();
			$table->longText('SchRecDmpDump')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_DesignTweaks', function(Blueprint $table)
		{
			$table->increments('TweakID');
			$table->string('TweakVersionAB')->nullable();
			$table->integer('TweakSubmissionProgress')->unsigned()->nullable();
			$table->string('TweakIPaddy')->nullable();
			$table->string('TweakTreeVersion')->nullable();
			$table->string('TweakUniqueStr')->nullable();
			$table->integer('TweakUserID')->unsigned()->nullable();
			$table->string('TweakIsMobile')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Sess', function(Blueprint $table)
		{
			$table->increments('SessID');
			$table->integer('SessUserID')->unsigned()->nullable();
			$table->integer('SessTree')->unsigned()->nullable();
			$table->integer('SessCoreID')->unsigned()->nullable();
			$table->boolean('SessIsActive')->nullable();
			$table->integer('SessCurrNode')->unsigned()->nullable();
			$table->integer('SessLoopRootJustLeft')->unsigned()->nullable();
			$table->integer('SessAfterJumpTo')->unsigned()->nullable();
			$table->boolean('SessIsMobile')->nullable();
			$table->string('SessBrowser', 255)->nullable();
			$table->string('SessIP')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_SessLoops', function(Blueprint $table)
		{
			$table->increments('SessLoopID');
			$table->integer('SessLoopSessID')->unsigned()->nullable();
			$table->string('SessLoopName', 50)->nullable();
			$table->integer('SessLoopItemID')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_NodeSavesPage', function(Blueprint $table)
		{
			$table->increments('PageSaveID');
			$table->integer('PageSaveSession')->unsigned()->nullable();
			$table->integer('PageSaveNode')->unsigned()->nullable();
			$table->integer('PageSaveLoopItemID')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_NodeSaves', function(Blueprint $table)
		{
			$table->increments('NodeSaveID');
			$table->integer('NodeSaveSession')->unsigned()->nullable();
			$table->integer('NodeSaveLoopItemID')->nullable();
			$table->integer('NodeSaveNode')->unsigned()->nullable();
			$table->string('NodeSaveVersionAB')->nullable();
			$table->string('NodeSaveTblFld', 100)->nullable();
			$table->longText('NodeSaveNewVal')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_SessEmojis', function(Blueprint $table)
		{
			$table->increments('SessEmoID');
			$table->integer('SessEmoUserID')->unsigned()->nullable();
			$table->integer('SessEmoTreeID')->unsigned()->nullable();
			$table->integer('SessEmoRecID')->nullable();
			$table->integer('SessEmoDefID')->unsigned()->nullable();
			$table->timestamps();
		});
		Schema::create('SL_SessSite', function(Blueprint $table)
		{
			$table->increments('SiteSessID');
			$table->string('SiteSessIPaddy')->nullable();
			$table->longText('SiteSessUserID')->nullable();
			$table->boolean('SiteSessIsMobile')->nullable();
			$table->string('SiteSessBrowser', 255)->nullable();
			$table->integer('SiteSessZoomPref')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_SessPage', function(Blueprint $table)
		{
			$table->increments('SessPageID');
			$table->integer('SessPageSessID')->unsigned()->nullable();
			$table->string('SessPageURL')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Tokens', function(Blueprint $table)
		{
			$table->increments('TokID');
			$table->string('TokType', 20)->nullable();
			$table->integer('TokUserID')->unsigned()->nullable();
			$table->integer('TokTreeID')->unsigned()->nullable();
			$table->integer('TokCoreID')->nullable();
			$table->string('TokTokToken', 255)->nullable();
			$table->timestamps();
		});
		Schema::create('SL_UsersRoles', function(Blueprint $table)
		{
			$table->increments('RoleUserID');
			$table->integer('RoleUserUID')->unsigned()->nullable();
			$table->integer('RoleUserRID')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Contact', function(Blueprint $table)
		{
			$table->increments('ContID');
			$table->string('ContType')->nullable();
			$table->string('ContFlag')->default('Unread')->nullable();
			$table->string('ContEmail')->nullable();
			$table->string('ContSubject')->nullable();
			$table->longText('ContBody')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Emails', function(Blueprint $table)
		{
			$table->increments('EmailID');
			$table->integer('EmailTree')->unsigned()->nullable();
			$table->string('EmailType')->nullable();
			$table->string('EmailName')->nullable();
			$table->longText('EmailSubject')->nullable();
			$table->longText('EmailBody')->nullable();
			$table->integer('EmailOpts')->default('1')->nullable();
			$table->integer('EmailTotSent')->default('0')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Emailed', function(Blueprint $table)
		{
			$table->increments('EmailedID');
			$table->integer('EmailedTree')->unsigned()->nullable();
			$table->integer('EmailedRecID')->nullable();
			$table->integer('EmailedEmailID')->unsigned()->nullable();
			$table->string('EmailedTo')->nullable();
			$table->integer('EmailedToUser')->unsigned()->nullable();
			$table->integer('EmailedFromUser')->unsigned()->nullable();
			$table->string('EmailedSubject')->nullable();
			$table->longText('EmailedBody')->nullable();
			$table->integer('EmailedOpts')->default('1')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_UsersActivity', function(Blueprint $table)
		{
			$table->increments('UserActID');
			$table->integer('UserActUser')->unsigned()->nullable();
			$table->string('UserActCurrPage')->nullable();
			$table->longText('UserActVal')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_LogActions', function(Blueprint $table)
		{
			$table->increments('LogID');
			$table->integer('LogUser')->unsigned()->nullable();
			$table->integer('LogDatabase')->unsigned()->nullable();
			$table->integer('LogTable')->unsigned()->nullable();
			$table->integer('LogField')->unsigned()->nullable();
			$table->string('LogAction', 20)->nullable();
			$table->string('LogOldName')->nullable();
			$table->string('LogNewName')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Zips', function(Blueprint $table)
		{
			$table->increments('ZipID');
			$table->string('ZipZip', 10)->nullable();
			$table->string('ZipLat')->nullable();
			$table->string('ZipLong')->nullable();
			$table->string('ZipCity', 100)->nullable();
			$table->string('ZipState')->nullable();
			$table->string('ZipCounty')->nullable();
			$table->string('ZipCountry', 100)->nullable();
			$table->timestamps();
		});
		Schema::create('SL_AddyGeo', function(Blueprint $table)
		{
			$table->increments('AdyGeoID');
			$table->string('AdyGeoAddress')->nullable();
			$table->string('AdyGeoLat')->nullable();
			$table->string('AdyGeoLong')->nullable();
			$table->timestamps();
		});
		Schema::create('SL_Uploads', function(Blueprint $table)
		{
			$table->increments('UpID');
			$table->integer('UpTreeID')->nullable();
			$table->integer('UpCoreID')->nullable();
			$table->integer('UpType')->nullable();
			$table->string('UpPrivacy', 10)->nullable();
			$table->string('UpTitle')->nullable();
			$table->longText('UpDesc')->nullable();
			$table->string('UpUploadFile')->nullable();
			$table->string('UpStoredFile')->nullable();
			$table->string('UpVideoLink')->nullable();
			$table->integer('UpNodeID')->nullable();
			$table->integer('UpLinkFldID')->nullable();
			$table->integer('UpLinkRecID')->nullable();
			$table->timestamps();
		});
    }
375329
public function up()
	{

		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');

		Schema::connection('ff-mt-em')->create('payments', function (Blueprint $table) {
			$table->increments('id');
			$table->string('cur', 3)->default('');
			$table->double('amount', 8, 2)->default(0);
			$table->string('code')->default('');
			$table->integer('city')->default(0);
			$table->string('name', 50)->default('');
			$table->string('email', 50)->default('');
			$table->timestamp('time')->default('0000-00-00 00:00:00');
			$table->string('term', 11)->default('');
			$table->string('to', 32)->default('');
			$table->string('from', 32)->default('');
			$table->string('type', 10)->default('');
			$table->string('status', 10)->default('');
			$table->timestamps();
		});

		Schema::connection('ff-mt-em')->create('terminals', function (Blueprint $table) {
			$table->increments('id');
			$table->integer('user_id')->default(0);
			$table->string('secret')->default('');
			$table->tinyInteger('mode')->default(Terminal::C_STATE_ENABLED);
			$table->timestamps();
		});

		Schema::connection('ff-mt-em')->create('cities', function (Blueprint $table) {
			$table->increments('id');
			$table->string('name')->default('');
			$table->string('country')->default('');
			$table->timestamps();
		});

		Schema::connection('ff-mt-em')->create('fee', function (Blueprint $table) {
			$table->increments('id');
			$table->integer('term_id')->default(0);
			$table->integer('city_id')->default(0);
			$table->double('amount_from', 8, 2)->default(0.00);
			$table->double('amount_to', 8, 2)->default(0.00);
			$table->double('value', 6, 2)->default(0.00);
			$table->string('cur', 3)->default('');
			$table->timestamps();
		});

		City::create(array(
			'name'    => 'London',
			'country' => 'UK',
		));

		City::create(array(
			'name'    => 'Kiev',
			'country' => 'UA',
		));

		City::create(array(
			'name'    => 'Moscow',
			'country' => 'RU',
		));


		Fee::create(array(
			'amount_from' => '0.01',
			'amount_to'   => '1000.00',
			'value'       => '200.00',
		));

		Fee::create(array(
			'amount_from' => '1000.01',
			'amount_to'   => '10000.00',
			'value'       => '250.00',
		));

		Fee::create(array(
			'amount_from' => '10000.01',
			'amount_to'   => '100000.00',
			'value'       => '500.00',
		));

	}