<?php

use Phalcon\Mvc\Model\Migration;
class DataseedBannerMigration_411 extends Migration
{
    public function up()
    {
        self::$connection->execute("
            TRUNCATE TABLE jaga.banner RESTART IDENTITY;
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('Asset_2spidc_crop__Web_resize.png', '/spidatachallenge', NULL, 1, TRUE, 'web');
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('Pancek_web__1___Custom_.png', '/kuisprofit', NULL, 2, FALSE, 'web');
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('maintenance_web__1___Custom_resize.png', '', NULL, 3, TRUE, 'web');
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('NewSPI-Web.png', 'http://q7survey.com/spikpk', NULL, 4, TRUE, 'web');
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('JAGA_Kampus_1.jpg', '/diskusi', '\"{\"categoryType\": \"Keluhan\", \"triggerCreate\": true, \"diskusiTypeId\": \"9\", \"categoryProduct\": \"Keluhan\", \"isCategoryProductLocked\": true}\"', 5, TRUE, 'web');
            
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('Asset_2spidc_crop__Mobile_resize.png', '/spidatachallenge', NULL, 1, TRUE, 'mobile');
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('Pancek__1___Custom_.png', '/kuisprofit', NULL, 2, FALSE, 'mobile');
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('maintenance__Custom_resize.png', '', NULL, 3, TRUE, 'mobile');
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('NewSPI-Web.png', 'http://q7survey.com/spikpk', NULL, 4, TRUE, 'mobile');
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('JAGA_Kampus_1.jpg', '/diskusi/create', '\"{\"categoryType\": \"Keluhan\", \"triggerCreate\": true, \"diskusiTypeId\": \"9\", \"categoryProduct\": \"Keluhan\", \"isCategoryProductLocked\": true}\"', 5, TRUE, 'mobile');
            INSERT INTO jaga.banner (filename, click_url, param_url, view_order, is_active, mode) VALUES ('Banner Mobile-02.jpg', NULL, NULL, 6, TRUE, 'mobile');
        ");
    }

    public function down()
    {
        self::$connection->execute("
            TRUNCATE TABLE jaga.banner RESTART IDENTITY;
        ");
    }
}
