From c0e83f8de881755f3b5e9b624c1c17ae2d4649ab Mon Sep 17 00:00:00 2001
From: einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>
Date: Tue, 31 Oct 2006 03:30:39 +0000
Subject: Defaults table revision. Most COA's and System->defaults are known to
 be broken.

git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@413 4979c152-3d1c-0410-bac9-87ea11338e46
---
 sql/Pg-tables.sql | 68 +++++++++++++++++++++++++++----------------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

(limited to 'sql/Pg-tables.sql')

diff --git a/sql/Pg-tables.sql b/sql/Pg-tables.sql
index d490110f..92dfbf26 100755
--- a/sql/Pg-tables.sql
+++ b/sql/Pg-tables.sql
@@ -59,27 +59,27 @@ CREATE TABLE defaults (
   expense_accno_id int,
   fxgain_accno_id int,
   fxloss_accno_id int,
-  sinumber text,
-  sonumber text,
-  yearend varchar(5),
-  weightunit varchar(5),
-  businessnumber text,
-  version varchar(8) PRIMARY KEY,
-  curr text,
-  closedto date,
-  revtrans bool DEFAULT 't',
-  ponumber text,
-  sqnumber text,
-  rfqnumber text,
-  audittrail bool default 'f',
-  vinumber text,
-  employeenumber text,
-  partnumber text,
-  customernumber text,
-  vendornumber text,
-  glnumber text,
-  projectnumber text
-);
+*/
+\COPY defaults FROM stdin WITH DELIMITER |
+sinumber|1
+sonumber|1
+yearend|1
+businessnumber|1
+version|1.2.0
+closedto|\N
+revtrans|1
+ponumber|1
+sqnumber|1
+rfqnumber|1
+audittrail|0
+vinumber|1
+employeenumber|1
+partnumber|1
+customernumber|1
+vendornumber|1
+glnumber|1
+projectnumber|1
+\.
 -- */
 CREATE TABLE acc_trans (
   trans_id int,
@@ -565,17 +565,6 @@ CREATE TABLE jcitems (
   notes text
 );
 
--- Session tracking table
-
-
-CREATE TABLE session(
-session_id serial PRIMARY KEY,
-sl_login VARCHAR(50),
-token VARCHAR(32) CHECK(length(token) = 32),
-last_used TIMESTAMP default now(),
-users_id INTEGER NOT NULL references users(id)
-);
-
 
 insert into transactions (id, table_name) SELECT id, 'ap' FROM ap;
 
@@ -708,7 +697,6 @@ field_id SERIAL PRIMARY KEY,
 table_id INT REFERENCES custom_table_catalog,
 field_name TEXT
 );
-INSERT INTO defaults (version) VALUES ('2.6.18');
 
 INSERT INTO taxmodule (
   taxmodule_id, taxmodulename
@@ -718,7 +706,8 @@ INSERT INTO taxmodule (
 
 -- USERS stuff --
 CREATE TABLE users (id serial UNIQUE, username varchar(30) primary key);
-COMMENT ON TABLE users IS 'username is the actual primary key here because we don't want duplicate users';
+COMMENT ON TABLE users IS 
+$$username is the actual primary key here because we don't want duplicate users$$;
 CREATE TABLE users_conf(id integer primary key references users(id) deferrable initially deferred,
                         acs text,
                         address text,
@@ -778,3 +767,14 @@ CREATE FUNCTION update_user(int4,text) RETURNS int4 AS $$
 COMMENT ON FUNCTION update_user(int4,text) IS $$ Takes int4 which is users.id and text which is username. Will update username based on id. Username is unique $$;
 
 
+-- Session tracking table
+
+
+CREATE TABLE session(
+session_id serial PRIMARY KEY,
+sl_login VARCHAR(50),
+token VARCHAR(32) CHECK(length(token) = 32),
+last_used TIMESTAMP default now(),
+users_id INTEGER  -- NOT NULL references users(id)
+);
+
-- 
cgit v1.2.3

on value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><div class='diffstat-header'><a href='/notmuch/diff/?h=master'>Diffstat</a> (limited to 'tags/80/5b/20171129100418.903A38789@lxp5.free-owl.de/unread')</div><table summary='diffstat' class='diffstat'><tr><td class='mode'>-rw-r--r--</td><td class='add'><a href='/notmuch/diff/tags/80/5b/20171129100418.903A38789@lxp5.free-owl.de/unread?h=master'>tags/80/5b/20171129100418.903A38789@lxp5.free-owl.de/unread</a></td><td class='right'>0</td><td class='graph'><table summary='file diffstat' width='0%'><tr><td class='add' style='width: -nan%;'/><td class='rem' style='width: -nan%;'/><td class='none' style='width: -nan%;'/></tr></table></td></tr>
</table><div class='diffstat-summary'>1 files changed, 0 insertions, 0 deletions</div><table summary='diff' class='diff'><tr><td>