From d4ad360f38e9c142204fdaeec748cc5800670607 Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Tue, 21 Nov 2017 11:13:04 +0000 Subject: [PATCH] Fixed schema issue for import value foreign key being set wrong --- lib/Pear/LocalLoop/Schema/Result/ImportValue.pm | 2 +- share/ddl/PostgreSQL/deploy/14/001-auto.sql | 2 +- share/ddl/PostgreSQL/deploy/15/001-auto.sql | 2 +- share/ddl/PostgreSQL/deploy/16/001-auto.sql | 2 +- share/ddl/PostgreSQL/upgrade/13-14/001-auto.sql | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Pear/LocalLoop/Schema/Result/ImportValue.pm b/lib/Pear/LocalLoop/Schema/Result/ImportValue.pm index a704323..90314c8 100644 --- a/lib/Pear/LocalLoop/Schema/Result/ImportValue.pm +++ b/lib/Pear/LocalLoop/Schema/Result/ImportValue.pm @@ -39,7 +39,7 @@ __PACKAGE__->add_columns( size => 255, }, transaction_id => { - data_type => 'varchar', + data_type => 'integer', is_foreign_key => 1, is_nullable => 1, }, diff --git a/share/ddl/PostgreSQL/deploy/14/001-auto.sql b/share/ddl/PostgreSQL/deploy/14/001-auto.sql index b2583b7..9e3d4be 100644 --- a/share/ddl/PostgreSQL/deploy/14/001-auto.sql +++ b/share/ddl/PostgreSQL/deploy/14/001-auto.sql @@ -206,7 +206,7 @@ CREATE TABLE "import_values" ( "purchase_date" timestamp NOT NULL, "purchase_value" character varying(255) NOT NULL, "org_name" character varying(255) NOT NULL, - "transaction_id" character varying, + "transaction_id" integer, PRIMARY KEY ("id") ); CREATE INDEX "import_values_idx_set_id" on "import_values" ("set_id"); diff --git a/share/ddl/PostgreSQL/deploy/15/001-auto.sql b/share/ddl/PostgreSQL/deploy/15/001-auto.sql index 552946d..86ca07f 100644 --- a/share/ddl/PostgreSQL/deploy/15/001-auto.sql +++ b/share/ddl/PostgreSQL/deploy/15/001-auto.sql @@ -206,7 +206,7 @@ CREATE TABLE "import_values" ( "purchase_date" timestamp NOT NULL, "purchase_value" character varying(255) NOT NULL, "org_name" character varying(255) NOT NULL, - "transaction_id" character varying, + "transaction_id" integer, "ignore_value" boolean DEFAULT false NOT NULL, PRIMARY KEY ("id") ); diff --git a/share/ddl/PostgreSQL/deploy/16/001-auto.sql b/share/ddl/PostgreSQL/deploy/16/001-auto.sql index 5a2f6dd..45aedba 100644 --- a/share/ddl/PostgreSQL/deploy/16/001-auto.sql +++ b/share/ddl/PostgreSQL/deploy/16/001-auto.sql @@ -220,7 +220,7 @@ CREATE TABLE "import_values" ( "purchase_date" timestamp NOT NULL, "purchase_value" character varying(255) NOT NULL, "org_name" character varying(255) NOT NULL, - "transaction_id" character varying, + "transaction_id" integer, "ignore_value" boolean DEFAULT false NOT NULL, PRIMARY KEY ("id") ); diff --git a/share/ddl/PostgreSQL/upgrade/13-14/001-auto.sql b/share/ddl/PostgreSQL/upgrade/13-14/001-auto.sql index d440b3e..6856826 100644 --- a/share/ddl/PostgreSQL/upgrade/13-14/001-auto.sql +++ b/share/ddl/PostgreSQL/upgrade/13-14/001-auto.sql @@ -18,7 +18,7 @@ CREATE TABLE "import_values" ( "purchase_date" timestamp NOT NULL, "purchase_value" character varying(255) NOT NULL, "org_name" character varying(255) NOT NULL, - "transaction_id" character varying, + "transaction_id" integer, PRIMARY KEY ("id") ); CREATE INDEX "import_values_idx_set_id" on "import_values" ("set_id");