| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace addons\CloudStock\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230718020309InsertQimallGlobalVarMap
- */
- class M230718020309InsertQimallGlobalVarMap extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try{
- $sql="INSERT INTO `qimall_global_var_map` ( `name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ('fill_price_difference', '补货差价', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);";
- $this->execute($sql);
- $sql="
- INSERT INTO `qimall_global_var_map` ( `name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ( 'first_equal', '直推平级奖', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);
- INSERT INTO `qimall_global_var_map` ( `name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ( 'first_over', '直推越级奖', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);
- INSERT INTO `qimall_global_var_map` ( `name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ( 'second_equal', '间推平级奖', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);
- INSERT INTO `qimall_global_var_map` ( `name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ( 'second_over', '直推越级奖', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);
- ";
- $this->execute($sql);
- $sql="INSERT INTO `qimall_global_var_map` ( `name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ( 'payment_for_level_goods_buy', '升级礼包赠送库存货款', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);
- ";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230718020309InsertQimallGlobalVarMap cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230718020309InsertQimallGlobalVarMap cannot be reverted.\n";
- return false;
- }
- */
- }
|