From: G. Richardson Date: Sun, 7 Aug 2016 20:40:09 +0000 (+0200) Subject: Tabelle assembly bekommt eine Positionsspalte X-Git-Tag: release-3.5.4~1901 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ea8bf9733e420ae3c74fdfc2765e9f2aa9da2815;p=kivitendo-erp.git Tabelle assembly bekommt eine Positionsspalte bisher wurde nach oid sortiert. --- diff --git a/SL/DB/MetaSetup/Assembly.pm b/SL/DB/MetaSetup/Assembly.pm index 87ffae6e3..47eb3cf3d 100644 --- a/SL/DB/MetaSetup/Assembly.pm +++ b/SL/DB/MetaSetup/Assembly.pm @@ -15,6 +15,7 @@ __PACKAGE__->meta->columns( itime => { type => 'timestamp', default => 'now()' }, mtime => { type => 'timestamp' }, parts_id => { type => 'integer', not_null => 1 }, + position => { type => 'integer' }, qty => { type => 'float', scale => 4 }, ); diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index 09fdc0d9e..e095506f1 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -21,6 +21,7 @@ __PACKAGE__->meta->add_relationships( assemblies => { type => 'one to many', class => 'SL::DB::Assembly', + manager_args => { sort_by => 'position, oid' }, column_map => { id => 'id' }, }, prices => { diff --git a/sql/Pg-upgrade2/assembly_position.sql b/sql/Pg-upgrade2/assembly_position.sql new file mode 100644 index 000000000..b96a0d66f --- /dev/null +++ b/sql/Pg-upgrade2/assembly_position.sql @@ -0,0 +1,6 @@ +-- @tag: assembly_position +-- @description: Erzeugniselemente (assembly) erhalten eine Position +-- @depends: release_3_4_1 +-- @ignore: 0 + +ALTER TABLE assembly ADD COLUMN position INTEGER;