Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1fc583c0

Von Kivitendo Admin vor mehr als 8 Jahren hinzugefügt

  • ID 1fc583c07256c62a5525ecb63ca2d0b0f8313887
  • Vorgänger cfe73453
  • Nachfolger 7f9c007f

ShopPart - part_id und shop_id NOT NULL, metatags

Unterschiede anzeigen:

SL/DB/MetaSetup/ShopPart.pm
14 14
  id               => { type => 'serial', not_null => 1 },
15 15
  itime            => { type => 'timestamp', default => 'now()' },
16 16
  last_update      => { type => 'timestamp' },
17
  meta_tags        => { type => 'text' },
17 18
  mtime            => { type => 'timestamp' },
18
  part_id          => { type => 'integer' },
19
  part_id          => { type => 'integer', not_null => 1 },
19 20
  shop_category    => { type => 'text' },
20 21
  shop_description => { type => 'text' },
21
  shop_id          => { type => 'integer' },
22
  shop_id          => { type => 'integer', not_null => 1 },
22 23
  show_date        => { type => 'date' },
23 24
  sortorder        => { type => 'integer' },
24 25
);
sql/Pg-upgrade2/shop_parts.sql
6 6

  
7 7
CREATE TABLE shop_parts (
8 8
  id               SERIAL PRIMARY KEY,
9
  shop_id          INTEGER REFERENCES shops(id),
10
  part_id          INTEGER REFERENCES parts(id),
9
  shop_id          INTEGER NOT NULL REFERENCES shops(id),
10
  part_id          INTEGER NOT NULL REFERENCES parts(id),
11 11
  shop_description TEXT,
12 12
  itime            TIMESTAMP DEFAULT now(),
13 13
  mtime            TIMESTAMP,
......
17 17
  front_page       BOOLEAN NOT NULL DEFAULT false,
18 18
  active           BOOLEAN NOT NULL DEFAULT false,  -- rather than obsolete
19 19
  shop_category    TEXT,
20
  meta_tags        TEXT,
20 21
  UNIQUE (part_id, shop_id)  -- make sure a shop_part appears only once per shop and part
21 22
);
22 23

  

Auch abrufbar als: Unified diff