db/db-schema.sql
changeset 61 b65843860274
parent 56 9409e7ab3f9d
child 65 a35a0edf9ddd
--- a/db/db-schema.sql	Fri Apr 20 08:26:22 2012 +0200
+++ b/db/db-schema.sql	Fri Apr 20 08:26:22 2012 +0200
@@ -4,6 +4,7 @@
     "l1" bigint not null,
     "i18n" boolean not null,
     "name" varchar(100) not null,
+    "updated_at" timestamp not null,
     "ol2" bigint,
     "s3" varchar(200) not null,
     "id" bigint primary key not null,
@@ -20,10 +21,13 @@
     "s1" varchar(200) not null,
     "note" varchar(10240),
     "os2" varchar(200),
+    "created_at" timestamp not null,
+    "created_by" bigint,
     "i2" integer not null,
     "oi3" integer,
     "l2" bigint not null,
     "ol3" bigint,
+    "updated_by" bigint,
     "os3" varchar(200),
     "deleted" boolean not null
   );
@@ -32,9 +36,13 @@
 create index "code_list_item_code_list_idx" on "code_list_item" ("code_list");
 create table "user" (
     "name" varchar(100) not null,
+    "updated_at" timestamp not null,
     "id" bigint primary key not null,
     "note" varchar(10240),
+    "created_at" timestamp not null,
+    "created_by" bigint,
     "login" varchar(40) not null,
+    "updated_by" bigint,
     "deleted" boolean not null,
     "active" boolean not null,
     "password" varchar(128) not null
@@ -44,9 +52,13 @@
 create index "user_login_idx" on "user" ("login");
 create table "city" (
     "name" varchar(100) not null,
+    "updated_at" timestamp not null,
     "id" bigint primary key not null,
     "country_id" bigint not null,
-    "note" varchar(10240)
+    "note" varchar(10240),
+    "created_at" timestamp not null,
+    "created_by" bigint,
+    "updated_by" bigint
   );
 create sequence "s_city_id";
 create table "address" (
@@ -60,13 +72,18 @@
 create table "country" (
     "iso3" varchar(3) not null,
     "name" varchar(100) not null,
+    "updated_at" timestamp not null,
     "id" bigint primary key not null,
     "iso2" varchar(2) not null,
-    "note" varchar(10240)
+    "note" varchar(10240),
+    "created_at" timestamp not null,
+    "created_by" bigint,
+    "updated_by" bigint
   );
 create sequence "s_country_id";
 create table "contact" (
     "name" varchar(100) not null,
+    "updated_at" timestamp not null,
     "id" bigint primary key not null,
     "work_mobile" varchar(40) not null,
     "private_mail" varchar(256),
@@ -75,9 +92,12 @@
     "first_name" varchar(80) not null,
     "fax" varchar(40),
     "note" varchar(10240),
+    "created_at" timestamp not null,
+    "created_by" bigint,
     "other_mail" varchar(256),
     "position" varchar(40),
     "other_mobile" varchar(40),
+    "updated_by" bigint,
     "private_mobile" varchar(40),
     "private_phone" varchar(40),
     "work_phone" varchar(40)
@@ -85,11 +105,15 @@
 create sequence "contact_id_seq";
 create table "company" (
     "name" varchar(100) not null,
+    "updated_at" timestamp not null,
     "id" bigint primary key not null,
     "partner" integer not null,
     "ico" varchar(40) not null,
     "note" varchar(10240),
+    "created_at" timestamp not null,
+    "created_by" bigint,
     "corresp_address_id" bigint,
+    "updated_by" bigint,
     "pin" integer not null,
     "address_id" bigint not null
   );