| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M240619100157InsertRbacAuthItem
- */
- class M240619100157InsertRbacAuthItem extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<SQL
- INSERT INTO `qimall_rbac_auth_item` (`name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`)
- VALUES ('mall/order/print-log', '打印日志', 'backend', '', '2819','2','0','999','tr_0 tr_2819','1','1638268906','1638782078','2');
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- echo "Error inserting record into table qimall_menu: " . $e->getMessage() . "\n";
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240619100157InsertRbacAuthItem cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240619100157InsertRbacAuthItem cannot be reverted.\n";
- return false;
- }
- */
- }
|