Index: openacs-4/packages/accounts-finance/sql/postgresql/accounts-finance-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/accounts-finance/sql/postgresql/accounts-finance-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/accounts-finance/sql/postgresql/accounts-finance-create.sql 14 Aug 2010 00:45:51 -0000 1.1 +++ openacs-4/packages/accounts-finance/sql/postgresql/accounts-finance-create.sql 14 Aug 2010 01:30:24 -0000 1.2 @@ -25,6 +25,8 @@ model_output_id int, iterations_requested int, iterations_completed int, + instance_id integer, + -- object_id of mounted instance (context_id) user_id integer, time_created timestamptz, last_modified timestamptz, Index: openacs-4/packages/spreadsheet/sql/postgresql/spreadsheet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/spreadsheet/sql/postgresql/spreadsheet-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/spreadsheet/sql/postgresql/spreadsheet-create.sql 3 Jul 2006 19:31:28 -0000 1.1 +++ openacs-4/packages/spreadsheet/sql/postgresql/spreadsheet-create.sql 14 Aug 2010 01:31:01 -0000 1.2 @@ -5,12 +5,24 @@ -- @cvs-id -- - CREATE TABLE qss_sheets ( - sheet_id integer constraint qss_sheets_sheet_id_fk - references acs_objects(object_id) - on delete cascade constraint qss_sheets_sheets_id_pk primary key, +-- we are not going to reference acs_objects directly, so that this can be used +-- separate from acs-core. +CREATE TABLE qss_sheets_object_id_map ( + sheet_id integer, + object_id integer constraint qss_sheets_sheet_id_fk + references acs_objects(object_id) + on delete cascade constraint qss_sheets_sheets_id_pk primary key, -- sheet_id constrained to object_id for permissions +); + +CREATE SEQUENCE qss_id start 10000; +SELECT nextval ('qss_id'); + + + CREATE TABLE qss_sheets ( + id integer DEFAULT nextval ( 'qss_id' ), + instance_id integer, -- object_id of mounted instance (context_id) @@ -45,8 +57,11 @@ ); CREATE TABLE qss_cells ( + id integer DEFAULT nextval ( 'qss_id' ), sheet_id varchar(40) not null, -- should be a value from qss_sheets.sheet_id + cell_row integer not null, + cell_column integer not null, cell_value varchar(1025), -- returned by function or user input value @@ -87,8 +102,6 @@ -- a label when displaying cell as a single value -- if cell_row is 0 then this is a column_title - cell_row integer not null, - cell_column integer not null, last_calculated timestamptz, -- handy for checking when cell value dependencies have changed