for create table statement dont use txn

This commit is contained in:
c9s 2024-01-19 15:27:06 +08:00
parent 611b2a9247
commit cfa0468867
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
20 changed files with 30 additions and 13 deletions

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE TABLE `trades`
(

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE TABLE `orders`
(

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE TABLE `trades`
(

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE INDEX trades_symbol ON trades(symbol);
CREATE INDEX trades_symbol_fee_currency ON trades(symbol, fee_currency, traded_at);

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE TABLE `orders`
(

View File

@ -1,5 +1,9 @@
-- +up
-- +begin
ALTER TABLE `trades` ADD COLUMN `order_id` INTEGER;
-- +end
-- +down
-- +begin
ALTER TABLE `trades` RENAME COLUMN `order_id` TO `order_id_deleted`;
-- +end

View File

@ -1,11 +1,12 @@
-- !txn
-- +up
-- +begin
CREATE TABLE `klines`
(
`gid` INTEGER PRIMARY KEY AUTOINCREMENT,
`exchange` VARCHAR(10) NOT NULL,
`start_time` DATETIME(3) NOT NULL,
`end_time` DATETIME(3) NOT NULL,
`start_time` DATETIME(3) NOT NULL,
`end_time` DATETIME(3) NOT NULL,
`interval` VARCHAR(3) NOT NULL,
`symbol` VARCHAR(7) NOT NULL,
`open` DECIMAL(16, 8) NOT NULL,
@ -25,8 +26,8 @@ CREATE TABLE `okex_klines`
(
`gid` INTEGER PRIMARY KEY AUTOINCREMENT,
`exchange` VARCHAR(10) NOT NULL,
`start_time` DATETIME(3) NOT NULL,
`end_time` DATETIME(3) NOT NULL,
`start_time` DATETIME(3) NOT NULL,
`end_time` DATETIME(3) NOT NULL,
`interval` VARCHAR(3) NOT NULL,
`symbol` VARCHAR(7) NOT NULL,
`open` DECIMAL(16, 8) NOT NULL,
@ -45,8 +46,8 @@ CREATE TABLE `binance_klines`
(
`gid` INTEGER PRIMARY KEY AUTOINCREMENT,
`exchange` VARCHAR(10) NOT NULL,
`start_time` DATETIME(3) NOT NULL,
`end_time` DATETIME(3) NOT NULL,
`start_time` DATETIME(3) NOT NULL,
`end_time` DATETIME(3) NOT NULL,
`interval` VARCHAR(3) NOT NULL,
`symbol` VARCHAR(7) NOT NULL,
`open` DECIMAL(16, 8) NOT NULL,
@ -65,8 +66,8 @@ CREATE TABLE `max_klines`
(
`gid` INTEGER PRIMARY KEY AUTOINCREMENT,
`exchange` VARCHAR(10) NOT NULL,
`start_time` DATETIME(3) NOT NULL,
`end_time` DATETIME(3) NOT NULL,
`start_time` DATETIME(3) NOT NULL,
`end_time` DATETIME(3) NOT NULL,
`interval` VARCHAR(3) NOT NULL,
`symbol` VARCHAR(7) NOT NULL,
`open` DECIMAL(16, 8) NOT NULL,

View File

@ -1,5 +0,0 @@
-- +up
SELECT 1;
-- +down
SELECT 1;

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE TABLE `rewards`
(

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
-- +begin
CREATE TABLE `withdraws`

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
-- +begin
CREATE TABLE `deposits`

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
-- +begin

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
-- +begin
CREATE TABLE `nav_history_details`

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
-- +begin
CREATE TABLE `kucoin_klines`

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE TABLE `profits`
(

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE TABLE `margin_loans`
(

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE TABLE `margin_repays`
(

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE TABLE `margin_interests`
(

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
CREATE TABLE `margin_liquidations`
(

View File

@ -1,3 +1,4 @@
-- !txn
-- +up
-- +begin
CREATE TABLE `bybit_klines`