
SET FOREIGN_KEY_CHECKS = 0;

#
# DDL START
#
CREATE TABLE aymax_cityp (
    id int(10) NOT NULL DEFAULT 0 COMMENT '' auto_increment,
    parent_id int(10) NOT NULL DEFAULT 0 COMMENT '',
    english varchar(100) NOT NULL DEFAULT '' COMMENT '',
    arabic varchar(100) NOT NULL DEFAULT '' COMMENT '',
    latitude double NOT NULL DEFAULT '' COMMENT '',
    longitude double NOT NULL DEFAULT '' COMMENT '',
    `left` int(10) NOT NULL DEFAULT 0 COMMENT '',
    `right` int(10) NOT NULL DEFAULT 0 COMMENT '',
    shift int(1) NOT NULL DEFAULT 0 COMMENT '',
    way int(1) NOT NULL DEFAULT 0 COMMENT '',
    daylight int(11) NOT NULL DEFAULT 0 COMMENT '',
    PRIMARY KEY (id)
);

CREATE TABLE motamiz_backup (
    id int(10) NOT NULL DEFAULT 0 COMMENT '' auto_increment,
    `time` varchar(30) NOT NULL DEFAULT '' COMMENT '',
    templatename varchar(100) NOT NULL DEFAULT '' COMMENT '',
    filename varchar(50) NOT NULL DEFAULT '' COMMENT '',
    backupdata longtext NOT NULL DEFAULT '' COMMENT '',
    type int(1) NOT NULL DEFAULT 0 COMMENT '',
    PRIMARY KEY (id)
);

CREATE TABLE motamiz_nokat (
    id int(11) NOT NULL DEFAULT 0 COMMENT '' auto_increment,
    nokta text NOT NULL DEFAULT '' COMMENT '',
    PRIMARY KEY (id)
);

ALTER TABLE motamiz_ads_banners
    ADD bnr_mime varchar(100) NOT NULL DEFAULT '' COMMENT '' AFTER bnr_data;


ALTER TABLE motamiz_ads_zone
    ADD width int(3) NOT NULL DEFAULT 0 COMMENT '' AFTER active,
    ADD hight int(3) NOT NULL DEFAULT 0 COMMENT '' AFTER width,
    MODIFY active int(1) NOT NULL DEFAULT 0 COMMENT '';


ALTER TABLE motamiz_audio_data
    ADD urlmode int(1) NOT NULL DEFAULT 0 COMMENT '' AFTER size,
    MODIFY audio_link text NOT NULL DEFAULT '' COMMENT '';


ALTER TABLE motamiz_blocks
    MODIFY MOTAMIZ_BLOCK_TITLE varchar(100) NOT NULL DEFAULT '' COMMENT '';

ALTER TABLE motamiz_news
    ADD Homepage varchar(20) NOT NULL DEFAULT '' COMMENT '' AFTER note,
    ADD INDEX Homepage (Homepage);


ALTER TABLE motamiz_section
    ADD blocksort int(5) NOT NULL DEFAULT 0 COMMENT '' AFTER htmlz;
