You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, per the request in discord, I have the following situation where I try to use schema inspect against a mysql instance, and it returns a value out of range error:
Error: template: inspect:1:4: executing "inspect" at <$.MarshalHCL>: error calling MarshalHCL: specutil: failed converting schema to spec: strconv.ParseInt: parsing "18446744073709551615": value out of range
If I set the format to sql when using inspect, I see the value it complains about is used in a table with its field type set to bigint. Dumping that specific table to a sql file:
CREATE TABLE testbed.`SEQUENCES` (`SEQ_NAME` varchar(50) NOT NULL, `INCREMENT_BY` int unsigned NOT NULL DEFAULT 1, `MIN_VAL` bigint unsigned NOT NULL DEFAULT 1, `MAX_VAL` bigint unsigned NOT NULL DEFAULT 18446744073709551615, `CUR_VAL` bigint unsigned NULL DEFAULT 1, `CYCLE` bool NOT NULL DEFAULT 0, PRIMARY KEY (`SEQ_NAME`)) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
To replicate the issue, I used a quick variation on the getting started directions: docker exec atlas-demo mysql -ppass -e "$(cat sequence_test.sql)"
And then to test against that: atlas schema inspect -u "mysql://root:[email protected]:3306/testbed"
Returns the following: Error: template: inspect:1:4: executing "inspect" at <$.MarshalHCL>: error calling MarshalHCL: specutil: failed converting schema to spec: strconv.ParseInt: parsing "18446744073709551615": value out of range
The text was updated successfully, but these errors were encountered:
a8m
added a commit
that referenced
this issue
Feb 2, 2024
Hello, per the request in discord, I have the following situation where I try to use schema inspect against a mysql instance, and it returns a value out of range error:
Error: template: inspect:1:4: executing "inspect" at <$.MarshalHCL>: error calling MarshalHCL: specutil: failed converting schema to spec: strconv.ParseInt: parsing "18446744073709551615": value out of range
If I set the format to sql when using inspect, I see the value it complains about is used in a table with its field type set to bigint. Dumping that specific table to a sql file:
CREATE TABLE testbed.`SEQUENCES` (`SEQ_NAME` varchar(50) NOT NULL, `INCREMENT_BY` int unsigned NOT NULL DEFAULT 1, `MIN_VAL` bigint unsigned NOT NULL DEFAULT 1, `MAX_VAL` bigint unsigned NOT NULL DEFAULT 18446744073709551615, `CUR_VAL` bigint unsigned NULL DEFAULT 1, `CYCLE` bool NOT NULL DEFAULT 0, PRIMARY KEY (`SEQ_NAME`)) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
To replicate the issue, I used a quick variation on the getting started directions:
docker exec atlas-demo mysql -ppass -e "$(cat sequence_test.sql)"
And then to test against that:
atlas schema inspect -u "mysql://root:[email protected]:3306/testbed"
Returns the following:
Error: template: inspect:1:4: executing "inspect" at <$.MarshalHCL>: error calling MarshalHCL: specutil: failed converting schema to spec: strconv.ParseInt: parsing "18446744073709551615": value out of range
The text was updated successfully, but these errors were encountered: