We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Processing this SQL:
CREATE TABLE IF NOT EXISTS "planidiet_app_valornormalperfil" ( "id" integer NOT NULL, "quantitat" decimal(9, 5) NOT NULL, "calories" decimal(9, 5) NOT NULL, "element_id" integer NOT NULL, "perfil_id" integer NOT NULL, FOREIGN KEY("element_id") REFERENCES "planidiet_app_element"("id") DEFERRABLE INITIALLY DEFERRED, FOREIGN KEY("perfil_id") REFERENCES "planidiet_app_perfil"("id") DEFERRABLE INITIALLY DEFERRED, PRIMARY KEY("id" AUTOINCREMENT) );
It creates that table in MySQL:
Table:planidiet_app_valornormalperfil Columns: id | int PK quantitat | decimal(10,0) calories | decimal(10,0) element_id | int perfil_id | int
Seems to ignore decimal digits!!
The text was updated successfully, but these errors were encountered:
Hey! I'm sorry but I simply can't reproduce this. I've even written a specific test for this and it passes normally.
I tried converting your SQLite DDL
CREATE TABLE "planidiet_app_valornormalperfil" ( "id" integer NOT NULL, "quantitat" decimal(9, 5) NOT NULL, "calories" decimal(9, 5) NOT NULL, "element_id" integer NOT NULL, "perfil_id" integer NOT NULL, FOREIGN KEY ("element_id") REFERENCES "planidiet_app_element" ("id") DEFERRABLE INITIALLY DEFERRED, FOREIGN KEY ("perfil_id") REFERENCES "planidiet_app_perfil" ("id") DEFERRABLE INITIALLY DEFERRED, PRIMARY KEY ("id" AUTOINCREMENT) );
and it got converted to
CREATE TABLE `planidiet_app_valornormalperfil` ( `id` int NOT NULL, `quantitat` decimal(9,5) NOT NULL, `calories` decimal(9,5) NOT NULL, `element_id` int NOT NULL, `perfil_id` int NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
Sorry, something went wrong.
✅ #21 Add test for DECIMAL
1a9ab3f
No branches or pull requests
Processing this SQL:
CREATE TABLE IF NOT EXISTS "planidiet_app_valornormalperfil" (
"id" integer NOT NULL,
"quantitat" decimal(9, 5) NOT NULL,
"calories" decimal(9, 5) NOT NULL,
"element_id" integer NOT NULL,
"perfil_id" integer NOT NULL,
FOREIGN KEY("element_id") REFERENCES "planidiet_app_element"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("perfil_id") REFERENCES "planidiet_app_perfil"("id") DEFERRABLE INITIALLY DEFERRED,
PRIMARY KEY("id" AUTOINCREMENT)
);
It creates that table in MySQL:
Table:planidiet_app_valornormalperfil
Columns:
id | int PK
quantitat | decimal(10,0)
calories | decimal(10,0)
element_id | int
perfil_id | int
Seems to ignore decimal digits!!
The text was updated successfully, but these errors were encountered: