diff --git a/hikyuu/data/mysql_upgrade/0016.sql b/hikyuu/data/mysql_upgrade/0016.sql new file mode 100644 index 00000000..1594a2d2 --- /dev/null +++ b/hikyuu/data/mysql_upgrade/0016.sql @@ -0,0 +1,4 @@ +CREATE TABLE IF NOT EXISTS `hku_base`.`BlockIndex` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `category` VARCHAR(100) NOT NULL, `name` VARCHAR(100) NOT NULL, `market_code` VARCHAR(30) NOT NULL, PRIMARY KEY (`id`), INDEX `ix_block` (`category`, `name`) +) COLLATE = 'utf8mb4_general_ci' ENGINE = InnoDB; +UPDATE `hku_base`.`version` set `version` = 16; \ No newline at end of file diff --git a/hikyuu/data/sqlite_upgrade/0017.sql b/hikyuu/data/sqlite_upgrade/0017.sql new file mode 100644 index 00000000..573b4553 --- /dev/null +++ b/hikyuu/data/sqlite_upgrade/0017.sql @@ -0,0 +1,16 @@ +BEGIN TRANSACTION; + +CREATE TABLE + IF NOT EXISTS `BlockIndex` ( + "id" INTEGER, + `category` VARCHAR(100) NOT NULL, + `name` VARCHAR(100) NOT NULL, + `market_code` VARCHAR(30) NOT NULL, + PRIMARY KEY("id" AUTOINCREMENT) + ); + +CREATE INDEX "ix_blockindex_category_name" ON "block" (category, name); + +UPDATE `version` set `version` = 17; + +COMMIT; \ No newline at end of file