[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6651] trunk/sql



Revision: 6651
          http://sourceforge.net/p/ledger-smb/code/6651
Author:   einhverfr
Date:     2014-01-26 07:40:00 +0000 (Sun, 26 Jan 2014)
Log Message:
-----------
Removing some old 1.4 fixes
adding max_ac_id to cr_report in order to make bug 940 fixable in 1.4

Modified Paths:
--------------
    trunk/sql/Pg-database.sql
    trunk/sql/modules/Fixes.sql

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2014-01-26 07:31:09 UTC (rev 6650)
+++ trunk/sql/Pg-database.sql	2014-01-26 07:40:00 UTC (rev 6651)
@@ -1138,6 +1138,7 @@
     approved_by int references entity(id),
     approved_username text,
     recon_fx bool default false,
+    max_ac_id int,
     CHECK (deleted is not true or approved is not true)
 );
 
@@ -1449,6 +1450,8 @@
   entry_id SERIAL PRIMARY KEY
 );
 
+ALTER TABLE cr_report ADD FOREIGN KEY (max_ac_id) REFERENCES acc_trans(entry_id);
+
 COMMENT ON TABLE acc_trans IS
 $$This table stores line items for financial transactions.  Please note that
 payments in 1.3 are not full-fledged transactions.$$;

Modified: trunk/sql/modules/Fixes.sql
===================================================================
--- trunk/sql/modules/Fixes.sql	2014-01-26 07:31:09 UTC (rev 6650)
+++ trunk/sql/modules/Fixes.sql	2014-01-26 07:40:00 UTC (rev 6651)
@@ -7,62 +7,9 @@
 
 -- BETA 1-3 (delete a month after Beta 4)
 
-BEGIN;
 
-CREATE TABLE lsmb_group (
-     role_name text primary key
-);
-
-CREATE TABLE lsmb_group_grants (
-     group_name text references lsmb_group(role_name),
-     granted_role text,
-     PRIMARY KEY (group_name, granted_role) 
-);
-
-COMMIT;
-
 BEGIN;
-CREATE TABLE trial_balance__yearend_types (
-    type text primary key
-);
-INSERT INTO trial_balance__yearend_types (type) 
-     VALUES ('none'), ('all'), ('last');
 
-
-CREATE TABLE trial_balance (
-    id serial primary key,
-    date_from date, 
-    date_to date,
-    description text NOT NULL,
-    yearend text not null references trial_balance__yearend_types(type)
-);
-
-CREATE TABLE trial_balance__account_to_report (
-    report_id int not null references trial_balance(id),
-    account_id int not null references account(id)
-);
-
-CREATE TABLE trial_balance__heading_to_report (
-    report_id int not null references trial_balance(id),
-    heading_id int not null references account_heading(id)
-);
-
-CREATE TYPE trial_balance__entry AS (
-    id int,
-    date_from date,
-    date_to date,
-    description text,
-    yearend text,
-    heading_id int,
-    accounts int[]
-);
-
-ALTER TABLE cr_report_line ADD FOREIGN KEY(ledger_id) REFERENCES acc_trans(entry_id);
-
-COMMIT;
-
-BEGIN;
-
 ALTER TABLE file_transaction DROP CONSTRAINT  "file_transaction_ref_key_fkey";
 ALTER TABLE file_transaction ADD FOREIGN KEY (ref_key) REFERENCES transactions(id);
 
@@ -335,3 +282,7 @@
 BEGIN;
 INSERT INTO defaults VALUES ('show_creditlimit', '1');
 COMMIT;
+
+BEGIN;
+ALTER TABLE cr_report ADD max_ac_id int references acc_trans(entry_id);
+COMMIT;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits