summaryrefslogtreecommitdiff
path: root/sql/Pg-database.sql
diff options
context:
space:
mode:
authorlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2007-06-21 21:08:46 +0000
committerlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2007-06-21 21:08:46 +0000
commita3363055beabd86c43c7e205f31ccf596ef441df (patch)
tree29f8d37fb531395c14364219f056fc4e91c9bcf6 /sql/Pg-database.sql
parentc31e62c0978a700b9f1b74c5c4ce6b4d3c919a1d (diff)
added tracking capability to location. When implemented in 1.3, locations should not be deleted. Instead they are marked active/inactive and tracked
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1295 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/Pg-database.sql')
-rw-r--r--sql/Pg-database.sql7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql
index cab04b00..bd710576 100644
--- a/sql/Pg-database.sql
+++ b/sql/Pg-database.sql
@@ -77,8 +77,11 @@ CREATE TABLE location (
line_three text,
city_province text check (city_province ~ '[[:alnum:]_]') NOT NULL,
country_id integer not null REFERENCES country(id),
- mail_code text not null check (mail_code ~ '[[:alnum:]_]'));
-
+ mail_code text not null check (mail_code ~ '[[:alnum:]_]'),
+ created date not null,
+ active boolean not null default TRUE,
+ inactive_date date default null,
+ );
CREATE INDEX location_unique_class_idx ON location (id,location_class);
CREATE TABLE company (