Dialect.VERSION = 1.4.0
CREATE TABLE IF NOT EXISTS `new_table` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(100) NOT NULL DEFAULT '',
categoryid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
companyid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
fields TEXT NOT NULL DEFAULT '',
start DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
end DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
status TINYINT(8) UNSIGNED NOT NULL DEFAULT 0,
extra TEXT NOT NULL DEFAULT '',
KEY categoryid (categoryid),
KEY companyid (companyid),
CONSTRAINT constraint_name UNIQUE KEY id (id)
) COLLATE=utf8_general_ci
CREATE VIEW `new_view` (
id,
name
) AS SELECT id, name FROM another_table
|