migrations: fix symbol lengths

This commit is contained in:
c9s 2024-09-25 16:05:12 +08:00
parent e11db4a2d1
commit 3ce9d20a2b
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
3 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ CREATE TABLE `profits`
`strategy` VARCHAR(32) NOT NULL,
`strategy_instance_id` VARCHAR(64) NOT NULL,
`symbol` VARCHAR(8) NOT NULL,
`symbol` VARCHAR(30) NOT NULL,
-- average_cost is the position average cost
`average_cost` DECIMAL(16, 8) UNSIGNED NOT NULL,
@ -25,7 +25,7 @@ CREATE TABLE `profits`
`quote_currency` VARCHAR(10) NOT NULL,
`base_currency` VARCHAR(10) NOT NULL,
`base_currency` VARCHAR(15) NOT NULL,
-- -------------------------------------------------------
-- embedded trade data --

View File

@ -6,9 +6,9 @@ CREATE TABLE `positions`
`strategy` VARCHAR(32) NOT NULL,
`strategy_instance_id` VARCHAR(64) NOT NULL,
`symbol` VARCHAR(20) NOT NULL,
`symbol` VARCHAR(32) NOT NULL,
`quote_currency` VARCHAR(10) NOT NULL,
`base_currency` VARCHAR(10) NOT NULL,
`base_currency` VARCHAR(15) NOT NULL,
-- average_cost is the position average cost
`average_cost` DECIMAL(16, 8) UNSIGNED NOT NULL,

View File

@ -1,7 +1,7 @@
-- +up
-- +begin
ALTER TABLE profits
CHANGE symbol symbol VARCHAR(20) NOT NULL;
CHANGE symbol symbol VARCHAR(32) NOT NULL;
-- +end
-- +down