diff --git a/mallinkAdmin/src/main/resources/db/migration/V201905091750__CHANGE_COUPON_CHANNEL.sql b/mallinkAdmin/src/main/resources/db/migration/V201905091750__CHANGE_COUPON_CHANNEL.sql new file mode 100644 index 000000000..12e60bbcf --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201905091750__CHANGE_COUPON_CHANNEL.sql @@ -0,0 +1,2 @@ +update wx_coupon_channel set begin_time = create_date where begin_time is null; +update wx_coupon_channel co, wx_coupon c set co.end_time = c.valid_end_date where co.target_ad != 2 and co.target_ad != 8 and co.coupon_id = c.id and c.valid_type = 1 and co.end_time is null; \ No newline at end of file