Revision 5b7e8b46
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/DB/Helper/ALL.pm | ||
---|---|---|
82 | 82 |
use SL::DB::Object; |
83 | 83 |
use SL::DB::Order; |
84 | 84 |
use SL::DB::OrderItem; |
85 |
use SL::DB::OrderStatus; |
|
85 | 86 |
use SL::DB::OrderVersion; |
86 | 87 |
use SL::DB::Part; |
87 | 88 |
use SL::DB::PartClassification; |
SL/DB/Helper/Mappings.pm | ||
---|---|---|
160 | 160 |
letter_draft => 'letter_draft', |
161 | 161 |
makemodel => 'make_model', |
162 | 162 |
notes => 'note', |
163 |
order_statuses => 'order_status', |
|
163 | 164 |
orderitems => 'order_item', |
164 | 165 |
oe => 'order', |
165 | 166 |
oe_version => 'order_version', |
SL/DB/Manager/OrderStatus.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::Manager::OrderStatus; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use parent qw(SL::DB::Helper::Manager); |
|
9 |
|
|
10 |
sub object_class { 'SL::DB::OrderStatus' } |
|
11 |
|
|
12 |
__PACKAGE__->make_manager_methods; |
|
13 |
|
|
14 |
1; |
SL/DB/MetaSetup/OrderStatus.pm | ||
---|---|---|
1 |
# This file has been auto-generated. Do not modify it; it will be overwritten |
|
2 |
# by rose_auto_create_model.pl automatically. |
|
3 |
package SL::DB::OrderStatus; |
|
4 |
|
|
5 |
use strict; |
|
6 |
|
|
7 |
use parent qw(SL::DB::Object); |
|
8 |
|
|
9 |
__PACKAGE__->meta->table('order_statuses'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
description => { type => 'text' }, |
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
itime => { type => 'timestamp', default => 'now()' }, |
|
15 |
mtime => { type => 'timestamp' }, |
|
16 |
name => { type => 'text', not_null => 1 }, |
|
17 |
obsolete => { type => 'boolean', default => 'false', not_null => 1 }, |
|
18 |
position => { type => 'integer', not_null => 1 }, |
|
19 |
); |
|
20 |
|
|
21 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
22 |
|
|
23 |
__PACKAGE__->meta->unique_keys([ 'name' ]); |
|
24 |
|
|
25 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
26 |
|
|
27 |
1; |
|
28 |
; |
SL/DB/OrderStatus.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::OrderStatus; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use SL::DB::MetaSetup::OrderStatus; |
|
9 |
use SL::DB::Manager::OrderStatus; |
|
10 |
|
|
11 |
__PACKAGE__->meta->initialize; |
|
12 |
|
|
13 |
1; |
sql/Pg-upgrade2/order_statuses.sql | ||
---|---|---|
1 |
-- @tag: order_statuses |
|
2 |
-- @description: Status für Angebote und Aufträge |
|
3 |
-- @depends: release_3_6_1 |
|
4 |
|
|
5 |
-- table |
|
6 |
CREATE TABLE order_statuses ( |
|
7 |
id SERIAL NOT NULL PRIMARY KEY, |
|
8 |
name TEXT UNIQUE NOT NULL, |
|
9 |
description TEXT, |
|
10 |
position INTEGER NOT NULL, |
|
11 |
obsolete BOOLEAN NOT NULL DEFAULT FALSE, |
|
12 |
itime TIMESTAMP DEFAULT now(), |
|
13 |
mtime TIMESTAMP |
|
14 |
); |
|
15 |
|
|
16 |
CREATE TRIGGER mtime_order_statuses |
|
17 |
BEFORE UPDATE ON order_statuses |
|
18 |
FOR EACH ROW |
|
19 |
EXECUTE PROCEDURE set_mtime(); |
|
20 |
|
|
21 |
|
|
22 |
-- default entry |
|
23 |
INSERT INTO order_statuses (name, description, position) |
|
24 |
VALUES ('bestätigt', 'Auftrag von Kunde bestätigt', 1); |
Auch abrufbar als: Unified diff
Angebot/Auftrag Status: DB-Upgrade und Rose