| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- *
- * Class M221111063020InsertIntoQimallTown
- */
- class M221111063020InsertIntoQimallTown extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '拓东街道', 1594555254, 1594555254);
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '鼓楼街道', 1594555254, 1594555254);
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '联盟街道', 1594555254, 1594555254);
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '金辰街道', 1594555254, 1594555254);
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '青云街道', 1594555254, 1594555254);
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '龙泉街道', 1594555254, 1594555254);
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '茨坝街道', 1594555254, 1594555254);
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '松华街道', 1594555254, 1594555254);
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '双龙街道', 1594555254, 1594555254);
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '滇源街道', 1594555254, 1594555254);
- INSERT INTO `qimall_town`( `district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES ( 2608, 530103, '阿子营街道', 1594555254, 1594555254);
- ";
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M221111063020InsertIntoQimallTown cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M221111063020InsertIntoQimallTown cannot be reverted.\n";
- return false;
- }
- */
- }
|