本文整理汇总了PHP中HFile类的典型用法代码示例。如果您正苦于以下问题:PHP HFile类的具体用法?PHP HFile怎么用?PHP HFile使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HFile类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: safeUp
public function safeUp()
{
$this->execute("ALTER TABLE `da_ajax` DROP `param_value`");
$this->execute("ALTER TABLE `da_ajax` DROP `param_name`");
$this->execute("ALTER TABLE `da_ajax` DROP `type_instance`");
$this->execute("ALTER TABLE `da_ajax` DROP `locate_type`");
$this->execute("ALTER TABLE `da_ajax` DROP `path`");
$this->execute("ALTER TABLE `da_ajax` DROP `function_name`");
$this->execute("ALTER TABLE `da_ajax` DROP `id_ajax`");
$this->execute("DROP TABLE `da_ajax`");
$this->execute("DROP TABLE `da_antispam`");
$this->execute("ALTER TABLE `da_file_upload_settings` DROP `sizeLimit`");
$this->execute("ALTER TABLE `da_file_upload_settings` DROP `minSizeLimit`");
$this->execute("ALTER TABLE `da_file_upload_settings` DROP `id_file_type`");
$this->execute("ALTER TABLE `da_file_upload_settings` DROP `countFiles`");
$this->execute("ALTER TABLE `da_file_upload_settings` DROP `id_add_object`");
$this->execute("ALTER TABLE `da_file_upload_settings` DROP `id_parameter`");
$this->execute("ALTER TABLE `da_file_upload_settings` DROP `id_object`");
$this->execute("DROP TABLE `da_file_upload_settings`");
$this->execute("ALTER TABLE `da_module` DROP `id_child_parent_object`");
$this->execute("ALTER TABLE `da_module` DROP `id_module_parent`");
$this->execute("ALTER TABLE `da_module` DROP `id_module_handler`");
$this->execute("ALTER TABLE `da_module` DROP `id_object`");
$this->execute("ALTER TABLE `da_module` DROP `name`");
$this->execute("DROP TABLE `da_module`");
$this->execute("DROP TABLE `da_cache_data`, `da_cache_setting_script`, `da_cache_url_block`, `da_domain_module`, `da_module_view`, `da_php_script_type_obj_rel`, `da_property`, `da_property_value`, `da_sequence`, `da_session`, `da_session_parameter`");
$path = dirname(__FILE__) . "/../../assets/";
HFile::removeDirectoryRecursive($path, false, false, false, array(".gitignore"));
}
示例2: safeUp
public function safeUp()
{
$this->execute("ALTER TABLE `pr_question` CHANGE `name` `name` VARCHAR(255) NOT NULL");
$this->execute("ALTER TABLE `pr_question` CHANGE `question` `question` LONGTEXT NOT NULL");
$path = dirname(__FILE__) . "/../../assets/";
HFile::removeDirectoryRecursive($path, false);
}
示例3: safeUp
public function safeUp()
{
$this->execute("UPDATE `da_object_parameters` SET `caption`='Обязательное', `not_null`=0 WHERE `da_object_parameters`.`id_object`=21 AND `da_object_parameters`.`id_parameter`=84");
$this->execute("UPDATE `da_object_parameters` SET `not_null`=0 WHERE `da_object_parameters`.`id_object`=21 AND `da_object_parameters`.`id_parameter`=156");
$path = dirname(__FILE__) . "/../../assets/";
HFile::removeDirectoryRecursive($path, false, false, false);
}
示例4: safeUp
public function safeUp()
{
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-list-alt' WHERE `da_object_view`.`id_object_view`='ygin-menu-view-main'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-bullhorn' WHERE `da_object_view`.`id_object_view`='2002'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-picture' WHERE `da_object_view`.`id_object_view`='2000'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-share-alt' WHERE `da_object_view`.`id_object_view`='2016'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-retweet' WHERE `da_object_view`.`id_object_view`='2011'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-comment' WHERE `da_object_view`.`id_object_view`='67'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-fullscreen' WHERE `da_object_view`.`id_object_view`='2018'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-book' WHERE `da_object_view`.`id_object_view`='2025'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-tags' WHERE `da_object_view`.`id_object_view`='100'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-import' WHERE `da_object_view`.`id_object_view`='100'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-tags' WHERE `da_object_view`.`id_object_view`='55'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-tag' WHERE `da_object_view`.`id_object_view`='57'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-gift' WHERE `da_object_view`.`id_object_view`='2008'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-shopping-cart' WHERE `da_object_view`.`id_object_view`='2017'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-bookmark' WHERE `da_object_view`.`id_object_view`='2023'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-th-large' WHERE `da_object_view`.`id_object_view`='2'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-dashboard' WHERE `da_object_view`.`id_object_view`='33'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-user' WHERE `da_object_view`.`id_object_view`='6'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-pushpin' WHERE `da_object_view`.`id_object_view`='13'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-wrench' WHERE `da_object_view`.`id_object_view`='12'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-calendar' WHERE `da_object_view`.`id_object_view`='33'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-book' WHERE `da_object_view`.`id_object_view`='9'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-inbox' WHERE `da_object_view`.`id_object_view`='32'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-cog' WHERE `da_object_view`.`id_object_view`='12'");
$this->execute("UPDATE `da_object_view` SET `icon_class`='glyphicon glyphicon-envelope' WHERE `da_object_view`.`id_object_view`='16'");
$path = dirname(__FILE__) . "/../../assets/";
@HFile::removeDirectoryRecursive($path, false, false, false, array(".gitignore"));
}
示例5: afterSave
public function afterSave($event)
{
if ($this->owner->isNewRecord && ($tmpId = $this->getTmpId())) {
if ($this->owner instanceof DaInstance) {
$finder = $this->owner;
} else {
$finder = $this->owner->model();
}
if ($this->resetScope) {
$finder->resetScope();
}
$model = $finder->findByIdInstance($this->owner->getIdInstance());
foreach ($this->getFiles() as $files) {
foreach ($files as $file) {
$modelDir = $model->getDir(true);
$file->file_path = $modelDir . $file->getName();
$file->id_instance = $model->getIdInstance();
$file->id_tmp = null;
$file->save(false);
}
}
if (count($this->getFiles()) > 0) {
//переносим файлы
$mpDir = Yii::getPathOfAlias('temp') . '/' . $this->getTmpId();
HFile::copyDirectory($mpDir, $model->getDir(true, true));
HFile::removeDirectoryRecursive($mpDir, true);
}
}
}
示例6: safeUp
public function safeUp()
{
$this->execute("ALTER TABLE `da_site_module` DROP `directory`");
$this->execute("ALTER TABLE `da_menu` DROP `directory`");
$path = dirname(__FILE__) . "/../../assets/";
@HFile::removeDirectoryRecursive($path, false, false, false, array(".gitignore"));
}
示例7: safeUp
public function safeUp()
{
$this->execute("UPDATE `da_object_parameters` SET `id_object`='105', `id_parameter`='532', `id_parameter_type`=10, `sequence`=7, `widget`='vote.backend.widgets.answerList.AnswerListWidget', `caption`='Варианты ответов', `field_name`=NULL, `add_parameter`='2', `default_value`=NULL, `not_null`=0, `sql_parameter`='VoteAnswerVisualElement', `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='' WHERE `da_object_parameters`.`id_object`='105' AND `da_object_parameters`.`id_parameter`='532'");
$this->execute("UPDATE `da_object` SET `yii_model`='vote.models.Voting' WHERE `da_object`.`id_object`='105'");
$path = dirname(__FILE__) . "/../../assets/";
@HFile::removeDirectoryRecursive($path, false, false, false, array(".gitignore"));
}
示例8: safeUp
public function safeUp()
{
$this->execute("ALTER TABLE `da_object_parameters` CHANGE `not_null` `not_null` TINYINT(1) default '1' COMMENT 'Обязательное'");
$this->execute("ALTER TABLE `da_object_parameters` CHANGE `is_unique` `is_unique` TINYINT(1) COMMENT 'Уникальное'");
$path = dirname(__FILE__) . "/../../assets/";
HFile::removeDirectoryRecursive($path, false, false, false);
}
示例9: safeUp
public function safeUp()
{
$this->execute("UPDATE `da_object_parameters` SET `id_object`=31, `id_parameter`=286, `id_parameter_type`=10, `sequence`=8, `name`='ngin.yiigin.DomainLocalizationVisualElement', `caption`='Доступные локализации', `field_name`='engine/admin/element/abstract/DomainLocalization.php', `add_parameter`=2, `default_value`=NULL, `not_null`=0, `sql_parameter`='DomainLocalization', `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`=NULL WHERE `da_object_parameters`.`id_object`=31 AND `da_object_parameters`.`id_parameter`=286");
$this->execute("UPDATE `da_object_parameters` SET `id_object`=21, `id_parameter`=76, `id_parameter_type`=7, `sequence`=1, `name`='ngin.yiigin.objectParameter.typeObjectParameterWidget.TypeObjectParameterWidget', `caption`='Тип свойства', `field_name`='id_parameter_type', `add_parameter`=22, `default_value`='2', `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`=NULL WHERE `da_object_parameters`.`id_object`=21 AND `da_object_parameters`.`id_parameter`=76");
$this->execute("UPDATE `da_object_parameters` SET `id_object`=20, `id_parameter`=68, `id_parameter_type`=7, `sequence`=9, `name`='id_field_caption', `caption`='Свойство для отображения', `field_name`='id_field_caption', `add_parameter`=21, `default_value`='', `not_null`=0, `sql_parameter`='t.id_object=:id_instance', `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Значение данного свойства будет выводится в списке, когда экземпляр данного объекта будет выбираться в качестве свойства другого объекта' WHERE `da_object_parameters`.`id_object`=20 AND `da_object_parameters`.`id_parameter`=68");
$this->execute("UPDATE `da_object_parameters` SET `id_object`=20, `id_parameter`=65, `id_parameter_type`=7, `sequence`=10, `name`='id_field_order', `caption`='Свойство для порядка', `field_name`='id_field_order', `add_parameter`=21, `default_value`='', `not_null`=0, `sql_parameter`='t.id_object=:id_instance', `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='По умолчанию выводимые в системе администрирования экземпляры данного объекта будут упорядочены по этому свойству' WHERE `da_object_parameters`.`id_object`=20 AND `da_object_parameters`.`id_parameter`=65");
$this->execute("UPDATE `da_object` SET `id_object`=21, `name`='Свойства объекта', `id_field_order`=77, `order_type`=1, `table_name`='da_object_parameters', `id_field_caption`=79, `object_type`=1, `folder_name`='', `parent_object`=20, `sequence`=2, `seq_start_value`=1500, `use_domain_isolation`=0, `id_object_handler`=NULL, `id_instance_class`=NULL, `field_caption`='caption', `yii_model`='ngin.models.object.ObjectParameter' WHERE `da_object`.`id_object`=21");
$this->execute("DELETE FROM `da_php_script_type` WHERE `da_php_script_type`.`id_php_script_type`=407");
$this->execute("UPDATE `da_object_parameters` SET `id_object`=66, `id_parameter`=420, `id_parameter_type`=7, `sequence`=7, `name`='ngin.yiigin.objectParameter.selectObjectParameterWidget.SelectObjectParameterWidget', `caption`='Параметр объекта', `field_name`='id_object_parameter', `add_parameter`=21, `default_value`='', `not_null`=0, `sql_parameter`='', `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='' WHERE `da_object_parameters`.`id_object`=66 AND `da_object_parameters`.`id_parameter`=420");
$this->execute("UPDATE `da_object` SET `id_object`=66, `name`='Колонка представления', `id_field_order`=419, `order_type`=1, `table_name`='da_object_view_column', `id_field_caption`=NULL, `object_type`=1, `folder_name`='', `parent_object`=63, `sequence`=9, `seq_start_value`=6000, `use_domain_isolation`=0, `id_object_handler`=NULL, `id_instance_class`=NULL, `field_caption`=NULL, `yii_model`='ngin.models.object.DaObjectViewColumn' WHERE `da_object`.`id_object`=66");
$this->execute("DELETE FROM `da_php_script_type` WHERE `da_php_script_type`.`id_php_script_type`=421");
$this->execute("UPDATE `da_object` SET `id_object`=93, `name`='Настройка загрузки файлов', `id_field_order`=NULL, `order_type`=1, `table_name`='da_file_upload_settings', `id_field_caption`=NULL, `object_type`=1, `folder_name`='', `parent_object`=1, `sequence`=33, `seq_start_value`=1, `use_domain_isolation`=0, `id_object_handler`=NULL, `id_instance_class`=NULL, `field_caption`=NULL, `yii_model`=NULL WHERE `da_object`.`id_object`=93");
$this->execute("DELETE FROM `da_php_script_type` WHERE `da_php_script_type`.`id_php_script_type`=425");
$this->execute("DELETE FROM `da_php_script_interface` WHERE `da_php_script_interface`.`id_php_script_interface`=12");
$this->execute("DELETE FROM `da_php_script_interface` WHERE `da_php_script_interface`.`id_php_script_interface`=11");
$this->execute("DELETE FROM `da_php_script_interface` WHERE `da_php_script_interface`.`id_php_script_interface`=10");
$this->execute("UPDATE `da_object_parameters` SET `id_object`=20, `id_parameter`=151, `id_parameter_type`=10, `sequence`=19, `name`='perm', `caption`='Права доступа', `field_name`='ngin.yiigin.object.objectPermission.ObjectPermissionWidget', `add_parameter`=2, `default_value`='', `not_null`=0, `sql_parameter`='ObjectPermissionVisualElement', `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='' WHERE `da_object_parameters`.`id_object`=20 AND `da_object_parameters`.`id_parameter`=151");
$this->execute("UPDATE `da_object_parameters` SET `id_object`=20, `id_parameter`=62, `id_parameter_type`=10, `sequence`=15, `name`='representation', `caption`='Создать представление', `field_name`='ngin.yiigin.object.objectManageView.ObjectManageViewWidget', `add_parameter`=2, `default_value`='', `not_null`=0, `sql_parameter`='ObjectRepresentationVisualElement', `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=1, `hint`='' WHERE `da_object_parameters`.`id_object`=20 AND `da_object_parameters`.`id_parameter`=62");
$this->execute("DELETE FROM `da_object_parameters` WHERE `da_object_parameters`.`id_object`=20 AND `da_object_parameters`.`id_parameter`=126");
$this->execute("UPDATE `da_object_parameters` SET `id_object`=101, `id_parameter`=14, `id_parameter_type`=10, `sequence`=10, `name`='modules', `caption`='Модули', `field_name`='menu.yiigin.widgets.manageModule.ManageModuleWidget', `add_parameter`=2, `default_value`='', `not_null`=0, `sql_parameter`='SiteModuleTemplateListOfModule', `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='' WHERE `da_object_parameters`.`id_object`=101 AND `da_object_parameters`.`id_parameter`=14");
$this->execute("UPDATE `da_object` SET `id_object`=101, `name`='Наборы модулей', `id_field_order`=16, `order_type`=2, `table_name`='da_site_module_template', `id_field_caption`=13, `object_type`=1, `folder_name`='', `parent_object`=102, `sequence`=7, `seq_start_value`=1, `use_domain_isolation`=0, `id_object_handler`=NULL, `id_instance_class`=NULL, `field_caption`='name', `yii_model`='SiteModuleTemplate' WHERE `da_object`.`id_object`=101");
$this->execute("UPDATE `da_object` SET `id_object`=89, `name`='Очистить кэш', `id_field_order`=NULL, `order_type`=1, `table_name`='yiigin/special/clearCache', `id_field_caption`=NULL, `object_type`=3, `folder_name`='', `parent_object`=3, `sequence`=2, `seq_start_value`=1, `use_domain_isolation`=0, `id_object_handler`=NULL, `id_instance_class`=NULL, `field_caption`=NULL, `yii_model`='' WHERE `da_object`.`id_object`=89");
$this->execute("UPDATE `da_object` SET `id_object`=94, `name`='Логи', `id_field_order`=NULL, `order_type`=1, `table_name`='yiigin/special/logView', `id_field_caption`=NULL, `object_type`=3, `folder_name`='', `parent_object`=3, `sequence`=12, `seq_start_value`=1, `use_domain_isolation`=0, `id_object_handler`=NULL, `id_instance_class`=NULL, `field_caption`=NULL, `yii_model`='' WHERE `da_object`.`id_object`=94");
$this->execute("UPDATE `da_object` SET `id_object`=60, `name`='Проверка файлов', `id_field_order`=NULL, `order_type`=1, `table_name`='yiigin/special/clearPreview', `id_field_caption`=NULL, `object_type`=3, `folder_name`='', `parent_object`=3, `sequence`=4, `seq_start_value`=1, `use_domain_isolation`=0, `id_object_handler`=NULL, `id_instance_class`=NULL, `field_caption`=NULL, `yii_model`='' WHERE `da_object`.`id_object`=60");
$this->execute("UPDATE `da_object` SET `id_object`=91, `name`='Поисковый индекс', `id_field_order`=NULL, `order_type`=1, `table_name`='yiigin/special/recreateSearchIndex', `id_field_caption`=NULL, `object_type`=3, `folder_name`='', `parent_object`=3, `sequence`=3, `seq_start_value`=1, `use_domain_isolation`=0, `id_object_handler`=NULL, `id_instance_class`=NULL, `field_caption`=NULL, `yii_model`='' WHERE `da_object`.`id_object`=91");
$this->execute("DELETE FROM `da_object_parameters` WHERE `da_object_parameters`.`id_object`=261 AND `da_object_parameters`.`id_parameter`=1316");
$this->execute("DELETE FROM `da_object_parameters` WHERE `da_object_parameters`.`id_object`=260 AND `da_object_parameters`.`id_parameter`=1308");
$this->execute("UPDATE `da_object_parameters` SET `id_object`=260, `id_parameter`=1307, `id_parameter_type`=10, `sequence`=9, `name`='statBanner', `caption`='Статистика', `field_name`='banners.yiigin.widgets.bannerStatistic.BannerStatisticWidget', `add_parameter`=2, `default_value`='', `not_null`=0, `sql_parameter`='BannerStatisticVisualElement', `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='' WHERE `da_object_parameters`.`id_object`=260 AND `da_object_parameters`.`id_parameter`=1307");
$path = dirname(__FILE__) . "/../../assets/";
HFile::removeDirectoryRecursive($path, false, false, false, array(".gitignore"));
}
示例10: safeUp
public function safeUp()
{
$this->execute("ALTER TABLE `da_object` CHANGE `id_object` `id_object` INT( 3 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_photogallery_photo` CHANGE `id_photogallery_photo` `id_photogallery_photo` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `da_object_parameters` CHANGE `id_parameter` `id_parameter` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `da_job` CHANGE `id_job` `id_job` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `da_object_view` CHANGE `id_object_view` `id_object_view` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `da_object_view_column` CHANGE `id_object_view_column` `id_object_view_column` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `da_php_script_interface` CHANGE `id_php_script_interface` `id_php_script_interface` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `da_php_script_type` CHANGE `id_php_script_type` `id_php_script_type` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `da_references` CHANGE `id_reference` `id_reference` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `da_reference_element` CHANGE `id_reference_element_instance` `id_reference_element_instance` INT( 8 ) NOT NULL AUTO_INCREMENT");
// $this->execute("ALTER TABLE `da_reference_element` DROP INDEX `id_reference_2`");
$this->execute("ALTER TABLE `da_rss` CHANGE `id_rss` `id_rss` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `da_site_module_template` CHANGE `id_module_template` `id_module_template` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `da_system_parameter` CHANGE `id_system_parameter` `id_system_parameter` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_news` CHANGE `id_news` `id_news` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_news_category` CHANGE `id_news_category` `id_news_category` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_photogallery` CHANGE `id_photogallery` `id_photogallery` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_product` CHANGE `id_product` `id_product` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_product_brand` CHANGE `id_brand` `id_brand` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_product_category` CHANGE `id_product_category` `id_product_category` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_quiz` CHANGE `id_quiz` `id_quiz` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_quiz_answer` CHANGE `id_quiz_answer` `id_quiz_answer` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_quiz_question` CHANGE `id_quiz_question` `id_quiz_question` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_vitrine` CHANGE `id_vitrine` `id_vitrine` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_voting` CHANGE `id_voting` `id_voting` INT( 8 ) NOT NULL AUTO_INCREMENT");
$this->execute("ALTER TABLE `pr_voting_answer` CHANGE `id_voting_answer` `id_voting_answer` INT( 8 ) NOT NULL AUTO_INCREMENT");
// $this->execute("ALTER TABLE `da_site_theme` DROP `active`");
// $this->execute("ALTER TABLE `da_site_theme` DROP `id_site_theme`");
$this->execute("DROP TABLE IF EXISTS `da_site_theme`");
$path = dirname(__FILE__) . "/../../assets/";
HFile::removeDirectoryRecursive($path, false);
}
示例11: safeUp
public function safeUp()
{
$this->execute("UPDATE `da_php_script_type` SET `id_php_script_type`=401, `file_path`='engine/process_class/MenuProcessGlobal.php', `class_name`='MenuProcessGlobal', `description`='MenuProcessGlobal', `id_php_script_interface`=12 WHERE `da_php_script_type`.`id_php_script_type`=401");
$this->execute("UPDATE `da_php_script_type` SET `id_php_script_type`=404, `file_path`='engine/process_class/UserProcessGlobal.php', `class_name`='UserProcessGlobal', `description`='UserProcessGlobal', `id_php_script_interface`=12 WHERE `da_php_script_type`.`id_php_script_type`=404");
$path = dirname(__FILE__) . "/../../assets/";
HFile::removeDirectoryRecursive($path, false, false, false);
}
示例12: safeUp
public function safeUp()
{
$this->execute("UPDATE da_object SET sequence = '7', name = 'Данные агрегатора', object_type = '1', table_name = 'da_aggregator_data', folder_name = NULL, field_caption = 'create_date', id_field_caption = NULL, id_field_order = NULL, order_type = '1', seq_start_value = '1', yii_model = NULL, id_object_handler = NULL, id_instance_class = NULL, parent_object = '5', use_domain_isolation = '0' WHERE id_object=79");
$this->execute("DELETE FROM `da_auth_item` WHERE `da_auth_item`.`name` = 'create_object_81' LIMIT 1");
$path = dirname(__FILE__) . "/../../assets/";
HFile::removeDirectoryRecursive($path, false);
}
示例13: safeUp
public function safeUp()
{
$this->execute("UPDATE `da_object_parameters` SET `id_object`='20', `id_parameter`='63', `id_parameter_type`=11, `sequence`=1, `widget`=NULL, `caption`='id', `field_name`='id_object', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД объекта в виде строки. Например для новостей ИД будет равен ygin-news Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='20' AND `da_object_parameters`.`id_parameter`='63'");
$this->execute("UPDATE `da_users` SET `id_user`=1, `name`='admin', `user_password`='91a399ceafc4f3ecb187932030b020e78d94952e', `mail`='web@cvek.ru', `full_name`='Разработчик', `rid`=NULL, `create_date`=1178788080, `count_post`=1, `active`=1, `requires_new_password`=0, `salt`='73561e3259556005dd91739f0c54744829a245d7', `password_strategy`='sha1' WHERE `da_users`.`id_user`=1");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='21', `id_parameter`='74', `id_parameter_type`=11, `sequence`=6, `widget`=NULL, `caption`='id', `field_name`='id_parameter', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД свойства объекта в виде строки. Например для заголовка новостей ИД будет равен ygin-news-title Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='21' AND `da_object_parameters`.`id_parameter`='74'");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='27', `id_parameter`='109', `id_parameter_type`=11, `sequence`=8, `widget`=NULL, `caption`='id', `field_name`='id_reference', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД справочника. Например ygin-shop-reference-order_status Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='27' AND `da_object_parameters`.`id_parameter`='109'");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='28', `id_parameter`='111', `id_parameter_type`=11, `sequence`=1, `widget`=NULL, `caption`='id', `field_name`='id_reference_element_instance', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД элемента справочника. Например ygin-shop-reference-order_status-new Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='28' AND `da_object_parameters`.`id_parameter`='111'");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='30', `id_parameter`='116', `id_parameter_type`=11, `sequence`=8, `widget`=NULL, `caption`='id', `field_name`='id_system_parameter', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД системного параметра. Например ygin-parameter-phone Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='30' AND `da_object_parameters`.`id_parameter`='116'");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='51', `id_parameter`='267', `id_parameter_type`=11, `sequence`=1, `widget`=NULL, `caption`='id', `field_name`='id_job', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД задачи планировщика. Например для отправки уведомлений это будет ygin-send_mail Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='51' AND `da_object_parameters`.`id_parameter`='267'");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='51', `id_parameter`='267', `id_parameter_type`=11, `sequence`=1, `widget`=NULL, `caption`='id', `field_name`='id_job', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД задачи планировщика. Например для отправки уведомлений это будет ygin-sendMail Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='51' AND `da_object_parameters`.`id_parameter`='267'");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='28', `id_parameter`='111', `id_parameter_type`=11, `sequence`=1, `widget`=NULL, `caption`='id', `field_name`='id_reference_element_instance', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД элемента справочника. Например ygin-shop-reference-orderStatus-new Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='28' AND `da_object_parameters`.`id_parameter`='111'");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='27', `id_parameter`='109', `id_parameter_type`=11, `sequence`=8, `widget`=NULL, `caption`='id', `field_name`='id_reference', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД справочника. Например ygin-shop-reference-orderStatus Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='27' AND `da_object_parameters`.`id_parameter`='109'");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='63', `id_parameter`='400', `id_parameter_type`=11, `sequence`=1, `widget`=NULL, `caption`='id', `field_name`='id_object_view', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД представления объекта в виде строки. Обычно имеет имя ygin-news-view-main Вместо ygin можно использовать название проекта или компании' WHERE `da_object_parameters`.`id_object`='63' AND `da_object_parameters`.`id_parameter`='400'");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='66', `id_parameter`='415', `id_parameter_type`=11, `sequence`=1, `widget`=NULL, `caption`='id', `field_name`='id_object_view_column', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД колонки представления. Например для заголовка новости ИД будет равен ygin-news-view-main-title Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='66' AND `da_object_parameters`.`id_parameter`='415'");
$this->execute("UPDATE `da_object_parameters` SET `id_object`='80', `id_parameter`='338', `id_parameter_type`=11, `sequence`=1, `widget`=NULL, `caption`='id', `field_name`='id_php_script_type', `add_parameter`='1', `default_value`=NULL, `not_null`=1, `sql_parameter`=NULL, `is_unique`=0, `group_type`=0, `need_locale`=0, `search`=0, `is_additional`=0, `hint`='Уникальный ИД пхп обработчика. Например для модуля новостей это будет ygin-news-module-last Вместо ygin можно использовать название проекта или компании.' WHERE `da_object_parameters`.`id_object`='80' AND `da_object_parameters`.`id_parameter`='338'");
$this->execute("UPDATE da_object_parameters SET id_object=replace(id_object, '.', '-')");
$this->execute("UPDATE da_object_parameters SET add_parameter=replace(add_parameter, '.', '-') WHERE id_parameter_type=7");
$this->execute("UPDATE da_object_view SET id_object=replace(id_object, '.', '-')");
$this->execute("UPDATE da_object_view_column SET id_object=replace(id_object, '.', '-')");
$this->execute("UPDATE da_object_view SET id_object_view=replace(id_object_view, '.', '-')");
$this->execute("UPDATE da_object_view_column SET id_object_view=replace(id_object_view, '.', '-')");
$this->execute("UPDATE da_object_view_column SET id_object_view_column=replace(id_object_view_column, '.', '-')");
$this->execute("UPDATE da_object_parameters SET id_parameter=replace(id_parameter, '.', '-')");
$this->execute("UPDATE da_files SET id_parameter=replace(id_parameter, '.', '-')");
$this->execute("UPDATE da_object_view_column SET id_object_parameter=replace(id_object_parameter, '.', '-')");
$path = dirname(__FILE__) . "/../../assets/";
@HFile::removeDirectoryRecursive($path, false, false, false, array(".gitignore"));
}
示例14: safeUp
public function safeUp()
{
$this->execute("ALTER TABLE `da_users` DROP `id_group`");
$this->execute("ALTER TABLE `da_users` CHANGE `mail` `mail` VARCHAR(255) NOT NULL");
$path = dirname(__FILE__) . "/../../assets/";
HFile::removeDirectoryRecursive($path, false, false, false);
}
示例15: safeUp
public function safeUp()
{
$this->execute("DELETE FROM da_search_data WHERE id_object=21 AND id_instance='39'");
$this->execute("DELETE FROM `da_object_parameters` WHERE `da_object_parameters`.`id_object`=34 AND `da_object_parameters`.`id_parameter`=39");
$path = dirname(__FILE__) . "/../../assets/";
HFile::removeDirectoryRecursive($path, false, false, false, array(".gitignore"));
}