mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-11-30 02:48:57 +08:00
add blockindex table
This commit is contained in:
parent
813eea963b
commit
862cdea36a
4
hikyuu/data/mysql_upgrade/0016.sql
Normal file
4
hikyuu/data/mysql_upgrade/0016.sql
Normal file
@ -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;
|
16
hikyuu/data/sqlite_upgrade/0017.sql
Normal file
16
hikyuu/data/sqlite_upgrade/0017.sql
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user