本文整理汇总了PHP中app\models\Country::tableName方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::tableName方法的具体用法?PHP Country::tableName怎么用?PHP Country::tableName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Country
的用法示例。
在下文中一共展示了Country::tableName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: up
public function up()
{
mb_internal_encoding("UTF-8");
$tableOptions = $this->db->driverName === 'mysql' ? 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB' : null;
// $lang = 'ru-RU';
// Yii::$app->language = $lang;
// // drop all
// $tables = $this->db->createCommand("SHOW TABLES")->queryAll();
// $this->db->createCommand("SET foreign_key_checks = 0")->execute();
// foreach ($tables as $table) {
// $this->dropTable($table['Tables_in_dotplant2_test']);
// }
// create tables
$this->createTable(ApiService::tableName(), ['service_id' => 'VARCHAR(255) NOT NULL PRIMARY KEY', 'access_token' => 'VARCHAR(255) NOT NULL', 'token_type' => 'VARCHAR(255) NOT NULL ', 'expires_in' => 'INT UNSIGNED NOT NULL ', 'create_ts' => 'I ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%session}}', ['id' => 'char(40) NOT NULL PRIMARY KEY', 'expire' => 'INT DEFAULT NULL', 'data' => 'BLOB'], $tableOptions);
$this->createTable(Image::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_id' => 'INT UNSIGNED NOT NULL', 'object_model_id' => 'INT UNSIGNED NOT NULL', 'filename' => 'VARCHAR(255) NOT NULL', 'image_descriptio ... //#注:代码行过长, 已省略后续字符...
$this->createTable(Navigation::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'parent_id' => 'INT UNSIGNED NOT NULL', 'name' => 'VARCHAR(255) NOT NULL', 'url' => 'VARCHAR(255)', 'route' => 'VARCHAR(255)', 'route_par ... //#注:代码行过长, 已省略后续字符...
$this->createTable(DynamicContent::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'route' => 'VARCHAR(255) DEFAULT NULL', 'name' => 'VARCHAR(255) DEFAULT NULL', 'content_block_name' => 'VARCHAR(80) DEFAULT \'content ... //#注:代码行过长, 已省略后续字符...
$this->createTable(Object::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'name' => 'VARCHAR(255) NOT NULL', 'object_class' => 'VARCHAR(255) NOT NULL', 'object_table_name' => 'VARCHAR(255) NOT NULL', 'column_propert ... //#注:代码行过长, 已省略后续字符...
$this->createTable(ObjectPropertyGroup::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_id' => 'INT UNSIGNED NOT NULL', 'object_model_id' => 'INT UNSIGNED NOT NULL', 'property_group_id' => 'INT UNSIGNED NOT N ... //#注:代码行过长, 已省略后续字符...
$this->createTable(ObjectStaticValues::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_id' => 'INT UNSIGNED NOT NULL', 'object_model_id' => 'INT UNSIGNED NOT NULL', 'property_static_value_id' => 'INT UNSIGNED ... //#注:代码行过长, 已省略后续字符...
$this->createTable(PropertyGroup::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_id' => 'INT UNSIGNED NOT NULL', 'name' => 'VARCHAR(255) NOT NULL', 'sort_order' => 'INT DEFAULT \'0\'', 'is_internal' => 'TINY ... //#注:代码行过长, 已省略后续字符...
$this->createTable(PropertyHandler::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'name' => 'VARCHAR(255) NOT NULL', 'frontend_render_view' => 'VARCHAR(255) NOT NULL', 'frontend_edit_view' => 'VARCHAR(255) NOT NULL ... //#注:代码行过长, 已省略后续字符...
$this->createTable(PropertyStaticValues::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'property_id' => 'INT UNSIGNED NOT NULL', 'name' => 'VARCHAR(255) NOT NULL', 'value' => 'VARCHAR(255) NOT NULL', 'slug' => 'VAR ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%product_category_full_slug}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'category_id' => 'INT UNSIGNED NOT NULL', 'full_slug_id' => 'INT UNSIGNED NOT NULL', 'KEY `category_id` (`category_id`)'], $tab ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%product_static_value_full_slug}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'full_slug_id' => 'INT UNSIGNED NOT NULL', 'property_static_value_id' => 'INT UNSIGNED NOT NULL', 'KEY `property_static_val ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%product_eav}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_model_id' => 'INTEGER UNSIGNED NOT NULL', 'property_group_id' => 'INT UNSIGNED NOT NULL', 'key' => 'VARCHAR(255) NOT NULL', 'value' => ... //#注:代码行过长, 已省略后续字符...
$this->createTable(Route::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'route' => 'VARCHAR(255) NOT NULL', 'url_template' => 'TEXT', 'object_id' => 'INT UNSIGNED DEFAULT NULL', 'name' => 'VARCHAR(255)'], $tableOpt ... //#注:代码行过长, 已省略后续字符...
$this->createTable(Property::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'property_group_id' => 'INT UNSIGNED NOT NULL', 'name' => 'VARCHAR(255) NOT NULL', 'key' => 'VARCHAR(20) DEFAULT \'\'', 'value_type' => 'EN ... //#注:代码行过长, 已省略后续字符...
$this->createTable(Product::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'main_category_id' => 'INT UNSIGNED NOT NULL', 'parent_id' => 'INT UNSIGNED DEFAULT \'0\'', 'option_generate' => 'TEXT DEFAULT NULL', 'name' ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%product_property}}', ['object_model_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY'], $tableOptions);
$this->createTable(Layout::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'name' => 'VARCHAR(255) NOT NULL', 'layout' => 'VARCHAR(255) NOT NULL'], $tableOptions);
$this->createTable(View::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'name' => 'VARCHAR(255) NOT NULL', 'view' => 'TEXT NOT NULL', 'category' => 'VARCHAR(255) DEFAULT NULL', 'internal_name' => 'VARCHAR(255) DEFAU ... //#注:代码行过长, 已省略后续字符...
$this->createTable(ViewObject::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_id' => 'INT UNSIGNED NOT NULL', 'object_model_id' => 'INT UNSIGNED NOT NULL', 'view_id' => 'INT UNSIGNED NOT NULL', 'UNIQUE KEY ` ... //#注:代码行过长, 已省略后续字符...
$this->createTable(Page::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'parent_id' => 'INT UNSIGNED NOT NULL', 'slug' => 'VARCHAR(80) NOT NULL', 'slug_compiled' => 'VARCHAR(180) NOT NULL DEFAULT \'\'', 'slug_absolu ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%page_property}}', ['object_model_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY'], $tableOptions);
$this->createTable('{{%page_category}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'category_id' => 'INT UNSIGNED NOT NULL', 'object_model_id' => 'INT UNSIGNED NOT NULL'], $tableOptions);
$this->createTable('{{%page_eav}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_model_id' => 'INT UNSIGNED NOT NULL', 'property_group_id' => 'INT UNSIGNED NOT NULL', 'key' => 'VARCHAR(255) NOT NULL', 'value' => 'TEXT ... //#注:代码行过长, 已省略后续字符...
$this->createTable(CategoryGroup::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'name' => 'VARCHAR(255) NOT NULL'], $tableOptions);
$this->createTable(Category::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'category_group_id' => 'INT UNSIGNED NOT NULL', 'parent_id' => 'INT UNSIGNED NOT NULL', 'name' => 'VARCHAR(255) NOT NULL', 'title' => 'VARC ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%category_eav}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_model_id' => 'INT UNSIGNED NOT NULL', 'property_group_id' => 'INT UNSIGNED NOT NULL', 'key' => 'VARCHAR(255) NOT NULL', 'value' => 'T ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%property_category}}', ['object_model_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY'], $tableOptions);
$this->createTable('{{%product_category}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'category_id' => 'INT UNSIGNED NOT NULL', 'object_model_id' => 'INT UNSIGNED NOT NULL', 'sort_order' => 'INT DEFAULT \'0\'', 'KEY `cat_om ... //#注:代码行过长, 已省略后续字符...
$this->createTable(CategoryGroupRouteTemplates::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'category_group_id' => 'int(11) unsigned NOT NULL', 'route_id' => 'INT UNSIGNED NOT NULL', 'template_json' => 'TEXT NOT ... //#注:代码行过长, 已省略后续字符...
$this->createTable(SubscribeEmail::tableName(), ['id' => 'INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'email' => 'VARCHAR(100) DEFAULT NULL', 'name' => 'VARCHAR(50) DEFAULT NULL', 'is_active' => 'TINYINT DEFAULT \'0\'', 'last_notif ... //#注:代码行过长, 已省略后续字符...
$this->createTable(Order::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'user_id' => 'INT UNSIGNED NOT NULL', 'manager_id' => 'INT UNSIGNED DEFAULT \'0\'', 'start_date' => 'TIMESTAMP DEFAULT CURRENT_TIMESTAMP', 'up ... //#注:代码行过长, 已省略后续字符...
// @todo Set all float fields as unsigned
$this->createTable(OrderItem::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'parent_id' => 'INT UNSIGNED NOT NULL DEFAULT 0', 'order_id' => 'INT UNSIGNED DEFAULT \'0\'', 'product_id' => 'INT UNSIGNED NOT NULL', 'cu ... //#注:代码行过长, 已省略后续字符...
$this->createTable(OrderTransaction::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'order_id' => 'INT UNSIGNED NOT NULL', 'payment_type_id' => 'INT UNSIGNED NOT NULL', 'start_date' => 'TIMESTAMP DEFAULT CURRENT_TIM ... //#注:代码行过长, 已省略后续字符...
$this->createTable(OrderChat::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'order_id' => 'INTEGER UNSIGNED NOT NULL', 'user_id' => 'INTEGER UNSIGNED NOT NULL', 'date' => 'TIMESTAMP DEFAULT CURRENT_TIMESTAMP', 'mes ... //#注:代码行过长, 已省略后续字符...
$this->createTable(ShippingOption::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'name' => 'VARCHAR(255) NOT NULL', 'description' => 'VARCHAR(255) NOT NULL', 'price_from' => 'FLOAT DEFAULT 0', 'price_to' => 'FLOAT ... //#注:代码行过长, 已省略后续字符...
$this->createTable(PaymentType::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'name' => 'VARCHAR(255) NOT NULL', 'class' => 'VARCHAR(255) NOT NULL', 'params' => 'TEXT DEFAULT NULL', 'logo' => 'VARCHAR(255) DEFAULT ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%order_property}}', ['object_model_id' => 'INTEGER UNSIGNED NOT NULL PRIMARY KEY'], $tableOptions);
$this->createTable('{{%order_eav}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_model_id' => 'INTEGER UNSIGNED NOT NULL', 'property_group_id' => 'INT UNSIGNED NOT NULL', 'key' => 'VARCHAR(255) NOT NULL', 'value' => ' ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%order_category}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'category_id' => 'INTEGER UNSIGNED NOT NULL', 'object_model_id' => 'INTEGER UNSIGNED NOT NULL'], $tableOptions);
$this->createTable(Form::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'name' => 'VARCHAR(255) NOT NULL', 'form_view' => 'VARCHAR(255) DEFAULT NULL', 'form_success_view' => 'VARCHAR(255) DEFAULT NULL', 'email_notif ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%form_eav}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_model_id' => 'INT UNSIGNED NOT NULL', 'property_group_id' => 'INT UNSIGNED NOT NULL', 'key' => 'VARCHAR(255) NOT NULL', 'value' => 'TEXT' ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%form_property}}', ['object_model_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY'], $tableOptions);
$this->createTable(Submission::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'form_id' => 'INT UNSIGNED NOT NULL', 'date_received' => 'DATETIME DEFAULT NULL', 'ip' => 'VARCHAR(255) DEFAULT NULL', 'user_agent' => 'V ... //#注:代码行过长, 已省略后续字符...
$this->createTable('{{%submission_property}}', ['object_model_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY'], $tableOptions);
$this->createTable('{{%submission_category}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'category_id' => 'INT UNSIGNED NOT NULL', 'object_model_id' => 'INT UNSIGNED NOT NULL'], $tableOptions);
$this->createTable('{{%submission_eav}}', ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_model_id' => 'INT UNSIGNED NOT NULL', 'property_group_id' => 'INT UNSIGNED NOT NULL', 'key' => 'VARCHAR(255) NOT NULL', 'value' => ... //#注:代码行过长, 已省略后续字符...
$this->createTable(Notification::tableName(), ['id' => 'BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'user_id' => 'INTEGER UNSIGNED NOT NULL', 'date' => 'TIMESTAMP DEFAULT CURRENT_TIMESTAMP', 'type' => 'ENUM(\'default\', \'primary\', ... //#注:代码行过长, 已省略后续字符...
$this->createTable(Review::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'object_id' => 'INT UNSIGNED DEFAULT \'0\'', 'object_model_id' => 'INT UNSIGNED NOT NULL', 'author_email' => 'VARCHAR(255) DEFAULT NULL', 're ... //#注:代码行过长, 已省略后续字符...
$this->createTable(ErrorLog::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'url_id' => 'INT UNSIGNED NOT NULL', 'http_code' => 'SMALLINT', 'timestamp' => 'TIMESTAMP DEFAULT CURRENT_TIMESTAMP', 'info' => 'TEXT DEFAU ... //#注:代码行过长, 已省略后续字符...
$this->createTable(ErrorUrl::tableName(), ['id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT', 'url' => 'TEXT DEFAULT NULL', 'immediate_notify_count' => 'INT UNSIGNED DEFAULT \'0\''], $tableOptions);
$this->createTable('{{%auth_rule}}', ['name' => 'VARCHAR(64) NOT NULL PRIMARY KEY', 'data' => 'TEXT', 'created_at' => 'INT DEFAULT NULL', 'updated_at' => 'INT DEFAULT NULL'], $tableOptions);
$this->createTable('{{%auth_item}}', ['name' => 'VARCHAR(64) NOT NULL PRIMARY KEY', 'type' => 'INT NOT NULL', 'description' => 'TEXT', 'rule_name' => 'VARCHAR(64)', 'data' => 'TEXT', 'created_at' => 'INT DEFAULT NULL', 'updated_at' => 'INT DE ... //#注:代码行过长, 已省略后续字符...
REFERENCES {{%auth_rule}} (`name`) ON DELETE SET NULL ON UPDATE CASCADE'], $tableOptions);
$this->createTable('{{%auth_item_child}}', ['parent' => 'VARCHAR(64) NOT NULL', 'child' => 'VARCHAR(64) NOT NULL', 'PRIMARY KEY (`parent`, `child`)', 'KEY `child` (`child`)', 'CONSTRAINT `auth_item_child_ibfk_1` FOREIGN KEY (`parent`)
REFERENCES {{%auth_item}} (`name`) ON DELETE CASCADE ON UPDATE CASCADE', 'CONSTRAINT `auth_item_child_ibfk_2` FOREIGN KEY (`child`)
REFERENCES {{%auth_item}} (`name`) ON DELETE CASCADE ON UPDATE CASCADE'], $tableOptions);
$this->createTable('{{%auth_assignment}}', ['item_name' => 'VARCHAR(64) NOT NULL', 'user_id' => 'VARCHAR(64) NOT NULL', 'created_at' => 'INT DEFAULT NULL', 'updated_at' => 'INT DEFAULT NULL', 'rule_name' => 'VARCHAR(64) DEFAULT NULL', 'data' ... //#注:代码行过长, 已省略后续字符...
REFERENCES {{%auth_item}} (`name`) ON DELETE CASCADE ON UPDATE CASCADE', 'CONSTRAINT `auth_assignment_ibfk_2` FOREIGN KEY (`rule_name`)
REFERENCES {{%auth_rule}} (`name`) ON DELETE SET NULL ON UPDATE CASCADE'], $tableOptions);
... //#注:代码段过长, 已省略后续内容. 更多信息请看源文件...