public function up()
 {
     $tableOptions = null;
     if ($this->db->driverName === 'mysql') {
         $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';
     }
     $this->createTable(Timezone::tableName(), ['id' => Schema::TYPE_PK, 'title' => Schema::TYPE_STRING . '(255) DEFAULT NULL', 'country' => Schema::TYPE_STRING . '(2) NOT NULL', 'timezone' => Schema::TYPE_STRING . '(255) NOT NULL', 'offset_gmt' => Schema::TYPE_DECIMAL . '(3,1) NOT NULL', 'offset_dst' => Schema::TYPE_DECIMAL . '(3,1) NOT NULL', 'offset_raw' => Schema::TYPE_DECIMAL . '(3,1) NOT NULL', 'order_popular' => Schema::TYPE_SMALLINT . ' NOT NULL DEFAULT 0', 'created_at' => Schema::TYPE_INTEGER . ' NOT NULL', 'updated_at' => Schema::TYPE_INTEGER . ' NOT NULL', 'UNIQUE (country, timezone)', 'FOREIGN KEY (country) REFERENCES ' . Country::tableName() . ' (iso) ON DELETE CASCADE ON UPDATE CASCADE'], $tableOptions);
 }
 public function up()
 {
     $tableOptions = null;
     if ($this->db->driverName === 'mysql') {
         $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';
     }
     $this->createTable(Country\Translation::tableName(), ['country_id' => Schema::TYPE_INTEGER . ' NOT NULL', 'language' => $this->string(16)->notNull(), 'name' => $this->string(255)->notNull(), 'capital' => $this->string(255)->notNull(), 'currency_name' => $this->string(255)->notNull(), 'CONSTRAINT fk_countries_country_translations_country_id FOREIGN KEY (country_id) REFERENCES ' . Country::tableName() . ' (id) ON DELETE CASCADE ON UPDATE CASCADE', 'PRIMARY KEY(country_id, language)'], $tableOptions);
 }
 public function down()
 {
     $this->dropTable(Country::tableName());
 }