CREATE TABLE oauth_authorization_codes (authorization_code VARCHAR(40) NOT NULL, client_id VARCHAR(80) NOT NULL, user_id VARCHAR(255) DEFAULT NULL, redirect_uri VARCHAR(2000) DEFAULT NULL, expires DATETIME NOT NULL, scope VARCHAR(2000) DEFAULT NULL, id_token VARCHAR(2000) DEFAULT NULL, PRIMARY KEY(authorization_code)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE sc_route (sc_route_id INT AUTO_INCREMENT NOT NULL, sc_route_name VARCHAR(2083) DEFAULT NULL, sc_route_desc CHAR(50) DEFAULT NULL, sc_route_level INT DEFAULT 0 NOT NULL, sc_route_trf_yn TINYINT(1) DEFAULT '0' NOT NULL, PRIMARY KEY(sc_route_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE sc_fun_route (sc_fun_route_id INT AUTO_INCREMENT NOT NULL, sc_route_id INT DEFAULT NULL, sc_function_id INT DEFAULT NULL, sc_fun_route_trf_yn TINYINT(1) DEFAULT '0' NOT NULL, PRIMARY KEY(sc_fun_route_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE oauth_access_tokens (access_token VARCHAR(40) NOT NULL, client_id VARCHAR(80) NOT NULL, user_id VARCHAR(255) DEFAULT NULL, expires DATETIME NOT NULL, scope VARCHAR(2000) DEFAULT NULL, PRIMARY KEY(access_token)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE oauth_jwt (client_id VARCHAR(80) NOT NULL, subject VARCHAR(80) DEFAULT NULL, public_key VARCHAR(2000) DEFAULT NULL, PRIMARY KEY(client_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE oauth_clients (client_id VARCHAR(80) NOT NULL, client_secret VARCHAR(80) NOT NULL, redirect_uri VARCHAR(2000) NOT NULL, grant_types VARCHAR(80) DEFAULT NULL, scope VARCHAR(2000) DEFAULT NULL, user_id VARCHAR(255) DEFAULT NULL, PRIMARY KEY(client_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE oauth_scopes (id INT NOT NULL, type VARCHAR(255) NOT NULL, scope VARCHAR(2000) DEFAULT NULL, client_id VARCHAR(80) DEFAULT NULL, is_default SMALLINT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE oauth_refresh_tokens (refresh_token VARCHAR(40) NOT NULL, client_id VARCHAR(80) NOT NULL, user_id VARCHAR(255) DEFAULT NULL, expires DATETIME NOT NULL, scope VARCHAR(2000) DEFAULT NULL, PRIMARY KEY(refresh_token)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
ALTER TABLE rv_reservation_item CHANGE rv_item_timestamp rv_item_timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE tc_prop_stock_update_prc ADD tc_prop_stock_update_prc_id INT AUTO_INCREMENT NOT NULL, ADD PRIMARY KEY (tc_prop_stock_update_prc_id);
ALTER TABLE rv_reservation CHANGE rv_wetu_timestamp rv_wetu_timestamp timestamp DEFAULT NULL, CHANGE rv_reservation_timestamp rv_reservation_timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE tc_sequence CHANGE tc_sequence_id tc_sequence_id VARCHAR(191) NOT NULL, ADD PRIMARY KEY (tc_sequence_id);
ALTER TABLE zp_session_guest ADD zp_session_guest_id INT AUTO_INCREMENT NOT NULL, ADD PRIMARY KEY (zp_session_guest_id);
ALTER TABLE td_deletions ADD td_deletions_id INT AUTO_INCREMENT NOT NULL, ADD PRIMARY KEY (td_deletions_id);
ALTER TABLE tc_property_trf_prc ADD tc_property_trf_prc_id INT AUTO_INCREMENT NOT NULL, ADD PRIMARY KEY (tc_property_trf_prc_id);
ALTER TABLE rv_payment_item CHANGE rv_pay_item_timestamp rv_pay_item_timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE pr_persona CHANGE pr_persona_timestamp pr_persona_timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE rv_extra CHANGE rv_extra_timestamp rv_extra_timestamp timestamp NOT NULL;
