[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3704] trunk/sql/upgrade
- Subject: SF.net SVN: ledger-smb:[3704] trunk/sql/upgrade
- From: ..hidden..
- Date: Fri, 16 Sep 2011 22:57:47 +0000
Revision: 3704
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3704&view=rev
Author: einhverfr
Date: 2011-09-16 22:57:47 +0000 (Fri, 16 Sep 2011)
Log Message:
-----------
Moving all svn db upgrade scripts to subdirectory.
Added Paths:
-----------
trunk/sql/upgrade/rc1-rc2.sql
trunk/sql/upgrade/svn/
trunk/sql/upgrade/svn/3206-invoice_order.sql
trunk/sql/upgrade/svn/3252-uniques.sql
trunk/sql/upgrade/svn/3263-menu_generate.sql
trunk/sql/upgrade/svn/3286-qty_type.sql
trunk/sql/upgrade/svn/3290-tax-account.sql
trunk/sql/upgrade/svn/3293-recon_payee.sql
trunk/sql/upgrade/svn/3297-employee_changes.sql
trunk/sql/upgrade/svn/3299-person_functions.sql
trunk/sql/upgrade/svn/3302-menu_changes.sql
trunk/sql/upgrade/svn/3310-taxform-function.sql
trunk/sql/upgrade/svn/3313-list_taxform_menu.sql
trunk/sql/upgrade/svn/3313-role-updates.sql
trunk/sql/upgrade/svn/3319-taxtable.-change.sql
trunk/sql/upgrade/svn/3326-new_custom_fields_funcs.sql
trunk/sql/upgrade/svn/3328-drop-location_result.sql
trunk/sql/upgrade/svn/3331-drop-bank-acct-save.sql
trunk/sql/upgrade/svn/3333-location-function-drop.sql
trunk/sql/upgrade/svn/3335-drop-location_saves.sql
trunk/sql/upgrade/svn/3353-add-assembly-fkeys.sql
trunk/sql/upgrade/svn/3355-yearend-fkey.sql
trunk/sql/upgrade/svn/3356-fkeys.sql
trunk/sql/upgrade/svn/3372-drop-location-delete.sql
trunk/sql/upgrade/svn/3383-menu-attributes.sql
trunk/sql/upgrade/svn/3386-drop-type.sql
trunk/sql/upgrade/svn/3410-menu-functions.sql
trunk/sql/upgrade/svn/3421-tax_tables.sql
trunk/sql/upgrade/svn/3422-tax_tables.sql
trunk/sql/upgrade/svn/3441-periods-view.sql
trunk/sql/upgrade/svn/3445-drop-save-user.sql
trunk/sql/upgrade/svn/3448-drop-location-search.sql
trunk/sql/upgrade/svn/3450-drop-user-function.sql
trunk/sql/upgrade/svn/3455-asset-schema.sql
trunk/sql/upgrade/svn/3467-assets.sql
trunk/sql/upgrade/svn/3470-asset-menu.sql
trunk/sql/upgrade/svn/3476-drop-unused-fields.sql
trunk/sql/upgrade/svn/3478-files.sql
trunk/sql/upgrade/svn/3479-inheritance_pkeys.sql
trunk/sql/upgrade/svn/3480-pkeys-2.sql
trunk/sql/upgrade/svn/3482-file_view_catelog.sql
trunk/sql/upgrade/svn/3495_drop_mime_func.sql
trunk/sql/upgrade/svn/3497-schema-changes.sql
trunk/sql/upgrade/svn/3509-drop-function.sql
trunk/sql/upgrade/svn/3532-drop-used-function.sql
trunk/sql/upgrade/svn/3534-drop_unused_function.sql
trunk/sql/upgrade/svn/3536-menu-update.sql
trunk/sql/upgrade/svn/3537-note-table.sql
trunk/sql/upgrade/svn/3538-asset-menu-fix.sql
trunk/sql/upgrade/svn/3547-constraints-upgrade.sql
trunk/sql/upgrade/svn/3551-asset-approval-menu.sql
trunk/sql/upgrade/svn/3560-settings.sql
trunk/sql/upgrade/svn/3572-letterhead-template-editing.sql
trunk/sql/upgrade/svn/3585-mime-type-data.sql
trunk/sql/upgrade/svn/3594-drop-batch-update.sql
trunk/sql/upgrade/svn/3613-drop-file_type.sql
trunk/sql/upgrade/svn/3626-more-mime-types.sql
trunk/sql/upgrade/svn/3637-dbversion-upgrade.sql
trunk/sql/upgrade/svn/3640-new-file-type.sql
trunk/sql/upgrade/svn/3679-drop-payment-function.sql
trunk/sql/upgrade/svn/3686-batch_post.sql
trunk/sql/upgrade/svn/3694-update_version.sql
trunk/sql/upgrade/svn/3703-grant-select-perm.sql
Removed Paths:
-------------
trunk/sql/upgrade/3206-invoice_order.sql
trunk/sql/upgrade/3252-uniques.sql
trunk/sql/upgrade/3263-menu_generate.sql
trunk/sql/upgrade/3286-qty_type.sql
trunk/sql/upgrade/3290-tax-account.sql
trunk/sql/upgrade/3293-recon_payee.sql
trunk/sql/upgrade/3297-employee_changes.sql
trunk/sql/upgrade/3299-person_functions.sql
trunk/sql/upgrade/3302-menu_changes.sql
trunk/sql/upgrade/3310-taxform-function.sql
trunk/sql/upgrade/3313-list_taxform_menu.sql
trunk/sql/upgrade/3313-role-updates.sql
trunk/sql/upgrade/3319-taxtable.-change.sql
trunk/sql/upgrade/3326-new_custom_fields_funcs.sql
trunk/sql/upgrade/3328-drop-location_result.sql
trunk/sql/upgrade/3331-drop-bank-acct-save.sql
trunk/sql/upgrade/3333-location-function-drop.sql
trunk/sql/upgrade/3335-drop-location_saves.sql
trunk/sql/upgrade/3353-add-assembly-fkeys.sql
trunk/sql/upgrade/3355-yearend-fkey.sql
trunk/sql/upgrade/3356-fkeys.sql
trunk/sql/upgrade/3372-drop-location-delete.sql
trunk/sql/upgrade/3383-menu-attributes.sql
trunk/sql/upgrade/3386-drop-type.sql
trunk/sql/upgrade/3410-menu-functions.sql
trunk/sql/upgrade/3421-tax_tables.sql
trunk/sql/upgrade/3422-tax_tables.sql
trunk/sql/upgrade/3441-periods-view.sql
trunk/sql/upgrade/3445-drop-save-user.sql
trunk/sql/upgrade/3448-drop-location-search.sql
trunk/sql/upgrade/3450-drop-user-function.sql
trunk/sql/upgrade/3455-asset-schema.sql
trunk/sql/upgrade/3467-assets.sql
trunk/sql/upgrade/3470-asset-menu.sql
trunk/sql/upgrade/3476-drop-unused-fields.sql
trunk/sql/upgrade/3478-files.sql
trunk/sql/upgrade/3479-inheritance_pkeys.sql
trunk/sql/upgrade/3480-pkeys-2.sql
trunk/sql/upgrade/3482-file_view_catelog.sql
trunk/sql/upgrade/3495_drop_mime_func.sql
trunk/sql/upgrade/3497-schema-changes.sql
trunk/sql/upgrade/3509-drop-function.sql
trunk/sql/upgrade/3532-drop-used-function.sql
trunk/sql/upgrade/3534-drop_unused_function.sql
trunk/sql/upgrade/3536-menu-update.sql
trunk/sql/upgrade/3537-note-table.sql
trunk/sql/upgrade/3538-asset-menu-fix.sql
trunk/sql/upgrade/3547-constraints-upgrade.sql
trunk/sql/upgrade/3551-asset-approval-menu.sql
trunk/sql/upgrade/3560-settings.sql
trunk/sql/upgrade/3572-letterhead-template-editing.sql
trunk/sql/upgrade/3585-mime-type-data.sql
trunk/sql/upgrade/3594-drop-batch-update.sql
trunk/sql/upgrade/3613-drop-file_type.sql
trunk/sql/upgrade/3626-more-mime-types.sql
trunk/sql/upgrade/3637-dbversion-upgrade.sql
trunk/sql/upgrade/3640-new-file-type.sql
trunk/sql/upgrade/3679-drop-payment-function.sql
trunk/sql/upgrade/3686-batch_post.sql
trunk/sql/upgrade/3694-update_version.sql
trunk/sql/upgrade/3703-grant-select-perm.sql
Deleted: trunk/sql/upgrade/3206-invoice_order.sql
===================================================================
--- trunk/sql/upgrade/3206-invoice_order.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3206-invoice_order.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,2 +0,0 @@
-ALTER TABLE invoice ADD precision int;
-ALTER TABLE orderitems ADD precision int;
Deleted: trunk/sql/upgrade/3252-uniques.sql
===================================================================
--- trunk/sql/upgrade/3252-uniques.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3252-uniques.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,2 +0,0 @@
-ALTER TABLE ar ADD unique(invnumber);
-ALTER TABLE person ADD UNIQUE (entity_id);
Deleted: trunk/sql/upgrade/3263-menu_generate.sql
===================================================================
--- trunk/sql/upgrade/3263-menu_generate.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3263-menu_generate.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,118 +0,0 @@
-
-
-CREATE OR REPLACE FUNCTION menu_generate() RETURNS SETOF menu_item AS
-$$
-DECLARE
- item menu_item;
- arg menu_attribute%ROWTYPE;
-BEGIN
- FOR item IN
- SELECT n.position, n.id, c.level, n.label, c.path,
- to_args(array[ma.attribute, ma.value])
- FROM connectby('menu_node', 'id', 'parent', 'position', '0',
- 0, ',')
- c(id integer, parent integer, "level" integer,
- path text, list_order integer)
- JOIN menu_node n USING(id)
- JOIN menu_attribute ma ON (n.id = ma.node_id)
- WHERE n.id IN (select node_id FROM menu_acl
- WHERE pg_has_role(CASE WHEN role_name
- ilike 'public'
- THEN current_user
- ELSE role_name
- END, 'USAGE')
- GROUP BY node_id
- HAVING bool_and(CASE WHEN acl_type ilike 'DENY'
- THEN FALSE
- WHEN acl_type ilike 'ALLOW'
- THEN TRUE
- END))
- or exists (select cn.id, cc.path
- FROM connectby('menu_node', 'id', 'parent',
- 'position', '0', 0, ',')
- cc(id integer, parent integer,
- "level" integer, path text,
- list_order integer)
- JOIN menu_node cn USING(id)
- WHERE cn.id IN
- (select node_id FROM menu_acl
- WHERE pg_has_role(CASE WHEN role_name
- ilike 'public'
- THEN current_user
- ELSE role_name
- END, 'USAGE')
- GROUP BY node_id
- HAVING bool_and(CASE WHEN acl_type
- ilike 'DENY'
- THEN false
- WHEN acl_type
- ilike 'ALLOW'
- THEN TRUE
- END))
- and cc.path like c.path || '%')
- GROUP BY n.position, n.id, c.level, n.label, c.path, c.list_order
- ORDER BY c.list_order
-
- LOOP
- RETURN NEXT item;
- END LOOP;
-END;
-$$ language plpgsql;
-
-CREATE OR REPLACE FUNCTION menu_children(in_parent_id int) RETURNS SETOF menu_item
-AS $$
-declare
- item menu_item;
- arg menu_attribute%ROWTYPE;
-begin
- FOR item IN
- SELECT n.position, n.id, c.level, n.label, c.path,
- to_args(array[ma.attribute, ma.value])
- FROM connectby('menu_node', 'id', 'parent', 'position',
- in_parent_id, 1, ',')
- c(id integer, parent integer, "level" integer,
- path text, list_order integer)
- JOIN menu_node n USING(id)
- JOIN menu_attribute ma ON (n.id = ma.node_id)
- WHERE n.id IN (select node_id FROM menu_acl
- WHERE pg_has_role(CASE WHEN role_name
- ilike 'public'
- THEN current_user
- ELSE role_name
- END, 'USAGE')
- GROUP BY node_id
- HAVING bool_and(CASE WHEN acl_type ilike 'DENY'
- THEN FALSE
- WHEN acl_type ilike 'ALLOW'
- THEN TRUE
- END))
- or exists (select cn.id, cc.path
- FROM connectby('menu_node', 'id', 'parent',
- 'position', '0', 0, ',')
- cc(id integer, parent integer,
- "level" integer, path text,
- list_order integer)
- JOIN menu_node cn USING(id)
- WHERE cn.id IN
- (select node_id FROM menu_acl
- WHERE pg_has_role(CASE WHEN role_name
- ilike 'public'
- THEN current_user
- ELSE role_name
- END, 'USAGE')
- GROUP BY node_id
- HAVING bool_and(CASE WHEN acl_type
- ilike 'DENY'
- THEN false
- WHEN acl_type
- ilike 'ALLOW'
- THEN TRUE
- END))
- and cc.path like c.path || '%')
- GROUP BY n.position, n.id, c.level, n.label, c.path, c.list_order
- ORDER BY c.list_order
- LOOP
- return next item;
- end loop;
-end;
-$$ language plpgsql;
Deleted: trunk/sql/upgrade/3286-qty_type.sql
===================================================================
--- trunk/sql/upgrade/3286-qty_type.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3286-qty_type.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1 +0,0 @@
-alter table invoice alter qty type numeric;
Deleted: trunk/sql/upgrade/3290-tax-account.sql
===================================================================
--- trunk/sql/upgrade/3290-tax-account.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3290-tax-account.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,107 +0,0 @@
-
-ALTER TABLE account ADD tax bool not null default false;
-
-UPDATE account
- SET tax = true
- WHERE id IN (SELECT account_id
- FROM account_link
- WHERE description LIKE '%_tax'
- UNION
- SELECT chart_id
- FROM tax);
-
-DROP FUNCTION account_save
-(in_id int, in_accno text, in_description text, in_category char(1),
-in_gifi_accno text, in_heading int, in_contra bool, in_link text[]);
-
-CREATE OR REPLACE FUNCTION account_save
-(in_id int, in_accno text, in_description text, in_category char(1),
-in_gifi_accno text, in_heading int, in_contra bool, in_tax bool,
-in_link text[])
-RETURNS int AS $$
-DECLARE
- t_heading_id int;
- t_link record;
- t_id int;
-BEGIN
- -- check to ensure summary accounts are exclusive
- -- necessary for proper handling by legacy code
- FOR t_link IN SELECT description FROM account_link_description
- WHERE summary='t'
- LOOP
- IF t_link.description = ANY (in_link)
- and array_upper(in_link, 1) > 1 THEN
- RAISE EXCEPTION 'Invalid link settings: Summary';
- END IF;
- END LOOP;
- -- heading settings
- IF in_heading IS NULL THEN
- SELECT id INTO t_heading_id FROM account_heading
- WHERE accno < in_accno order by accno desc limit 1;
- ELSE
- t_heading_id := in_heading;
- END IF;
-
- -- don't remove custom links.
- DELETE FROM account_link
- WHERE account_id = in_id
- and description in ( select description
- from account_link_description
- where custom = 'f');
-
- UPDATE account
- SET accno = in_accno,
- description = in_description,
- category = in_category,
- gifi_accno = in_gifi_accno,
- heading = t_heading_id,
- contra = in_contra,
- tax = in_tax
- WHERE id = in_id;
-
- IF FOUND THEN
- t_id := in_id;
- ELSE
- INSERT INTO account (accno, description, category, gifi_accno,
- heading, contra, tax)
- VALUES (in_accno, in_description, in_category, in_gifi_accno,
- t_heading_id, in_contra, in_tax);
-
- t_id := currval('account_id_seq');
- END IF;
-
- FOR t_link IN
- select in_link[generate_series] AS val
- FROM generate_series(array_lower(in_link, 1),
- array_upper(in_link, 1))
- LOOP
- INSERT INTO account_link (account_id, description)
- VALUES (t_id, t_link.val);
- END LOOP;
-
-
- RETURN t_id;
-END;
-$$ language plpgsql;
-
-
-DROP VIEW chart CASCADE;
-
-CREATE VIEW chart AS
-SELECT id, accno, description, 'H' as charttype, NULL as category, NULL as link, NULL as account_heading, null as gifi_accno, false as contra, false as tax from account_heading UNION
-select c.id, c.accno, c.description, 'A' as charttype, c.category, concat_colon(l.description) as link, heading, gifi_accno, contra, tax from account c left join account_link l ON (c.id = l.account_id) group by c.id, c.accno, c.description, c.category, c.heading, c.gifi_accno, c.contra, c.tax;
-
-GRANT SELECT ON chart TO public;
-
-CREATE OR REPLACE RULE chart_i AS ON INSERT TO chart
-DO INSTEAD
-SELECT CASE WHEN new.charttype='H' THEN
- account_heading_save(new.id, new.accno, new.description, NULL)
-ELSE
- account_save(new.id, new.accno, new.description, new.category,
- new.gifi_accno, NULL,
- CASE WHEN new.contra IS NULL THEN FALSE ELSE new.contra END,
- CASE WHEN new.tax IS NULL THEN FALSE ELSE new.tax END,
- string_to_array(new.link, ':'))
-END;
-
Deleted: trunk/sql/upgrade/3293-recon_payee.sql
===================================================================
--- trunk/sql/upgrade/3293-recon_payee.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3293-recon_payee.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,32 +0,0 @@
-
-CREATE OR REPLACE VIEW recon_payee AS
- SELECT n.name AS payee, rr.id, rr.report_id, rr.scn, rr.their_balance, rr.our_balance, rr.errorcode, rr."user", rr.clear_time, rr.insert_time, rr.trans_type, rr.post_date, rr.ledger_id, rr.voucher_id, rr.overlook, rr.cleared
- FROM cr_report_line rr
- LEFT JOIN acc_trans ac ON rr.ledger_id = ac.entry_id
- LEFT JOIN gl ON ac.trans_id = gl.id
- LEFT JOIN (( SELECT ap.id, e.name
- FROM ap
- JOIN entity_credit_account eca ON ap.entity_credit_account = eca.id
- JOIN entity e ON eca.entity_id = e.id
-UNION
- SELECT ar.id, e.name
- FROM ar
- JOIN entity_credit_account eca ON ar.entity_credit_account = eca.id
- JOIN entity e ON eca.entity_id = e.id)
-UNION
- SELECT gl.id, gl.description
- FROM gl) n ON n.id = ac.trans_id;
-
-
-CREATE OR REPLACE FUNCTION reconciliation__report_details_payee (in_report_id INT) RETURNS setof recon_payee as $$
- DECLARE
- row recon_payee;
- BEGIN
- FOR row IN
- select * from recon_payee where report_id = in_report_id
- order by scn, post_date
- LOOP
- RETURN NEXT row;
- END LOOP;
- END;
-$$ language 'plpgsql';
\ No newline at end of file
Deleted: trunk/sql/upgrade/3297-employee_changes.sql
===================================================================
--- trunk/sql/upgrade/3297-employee_changes.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3297-employee_changes.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,36 +0,0 @@
-drop function employee__get(int);
-
-CREATE TYPE employee_result AS (
- entity_id int,
- person_id int,
- salutation text,
- first_name text,
- middle_name text,
- last_name text,
- startdate date,
- enddate date,
- role varchar(20),
- ssn text,
- sales bool,
- manager_id int,
- manager_first_name text,
- manager_last_name text,
- employeenumber varchar(32),
- dob date
-);
-
-CREATE OR REPLACE FUNCTION employee__get
-(in_entity_id integer)
-returns employee_result as
-$$
- SELECT p.entity_id, p.id, s.salutation,
- p.first_name, p.middle_name, p.last_name,
- ee.startdate, ee.enddate, ee.role, ee.ssn, ee.sales, ee.manager_id,
- mp.first_name, mp.last_name, ee.employeenumber, ee.dob
- FROM person p
- JOIN entity_employee ee on (ee.entity_id = p.entity_id)
-LEFT JOIN salutation s on (p.salutation_id = s.id)
-LEFT JOIN person mp ON ee.manager_id = p.entity_id
- WHERE p.entity_id = $1;
-$$ language sql;
-
Deleted: trunk/sql/upgrade/3299-person_functions.sql
===================================================================
--- trunk/sql/upgrade/3299-person_functions.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3299-person_functions.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,30 +0,0 @@
-CREATE OR REPLACE FUNCTION person__list_bank_account(in_entity_id int)
-RETURNS SETOF entity_bank_account AS
-$$
-DECLARE out_row entity_bank_account%ROWTYPE;
-BEGIN
- FOR out_row IN
- SELECT * from entity_bank_account where entity_id = in_entity_id
- LOOP
- RETURN NEXT out_row;
- END LOOP;
-END;
-$$ LANGUAGE PLPGSQL;
-
-CREATE OR REPLACE FUNCTION person__list_notes(in_entity_id int)
-RETURNS SETOF entity_note AS
-$$
-DECLARE out_row record;
-BEGIN
- FOR out_row IN
- SELECT *
- FROM entity_note
- WHERE ref_key = in_entity_id
- ORDER BY created
- LOOP
- RETURN NEXT out_row;
- END LOOP;
-END;
-$$ LANGUAGE PLPGSQL;
-
-
Deleted: trunk/sql/upgrade/3302-menu_changes.sql
===================================================================
--- trunk/sql/upgrade/3302-menu_changes.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3302-menu_changes.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,18 +0,0 @@
-update menu_attribute
- set node_id = 49,
- attribute = 'l_last_name',
- value = '1'
- WHERE id = 115;
-update menu_attribute
- set node_id = 49,
- attribute = 'l_employeenumber',
- value = '1'
- WHERE id = 116;
-update menu_attribute
- set node_id = 49,
- attribute = 'module',
- value = 'employee.pl'
- WHERE id = 118;
-
-
-
Deleted: trunk/sql/upgrade/3310-taxform-function.sql
===================================================================
--- trunk/sql/upgrade/3310-taxform-function.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3310-taxform-function.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,3 +0,0 @@
-DROP FUNCTION tax_form__save(in_country_id int,
- in_form_name text, in_default_reportable bool);
-
Deleted: trunk/sql/upgrade/3313-list_taxform_menu.sql
===================================================================
--- trunk/sql/upgrade/3313-list_taxform_menu.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3313-list_taxform_menu.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,11 +0,0 @@
-SELECT menu_insert(217, 2, 'List Tax Forms');
-INSERT INTO menu_attribute(node_id, attribute, value)
- VALUES (currval('menu_node_id_seq')::int, 'module', 'taxform.pl');
-INSERT INTO menu_attribute(node_id, attribute, value)
- VALUES (currval('menu_node_id_seq')::int, 'action', 'list_all');
-
-SELECT menu_insert(217, 3, 'Reports');
-INSERT INTO menu_attribute(node_id, attribute, value)
- VALUES (currval('menu_node_id_seq')::int, 'module', 'taxform.pl');
-
-
Deleted: trunk/sql/upgrade/3313-role-updates.sql
===================================================================
--- trunk/sql/upgrade/3313-role-updates.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3313-role-updates.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,4 +0,0 @@
-
-INSERT INTO menu_acl (node_id, acl_type, role_name)
-SELECT id, 'allow', 'lsmb_' || current_database() ||'__tax_form_save'
- FROM menu_node WHERE parent = 217 and position in (2,3);
Deleted: trunk/sql/upgrade/3319-taxtable.-change.sql
===================================================================
--- trunk/sql/upgrade/3319-taxtable.-change.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3319-taxtable.-change.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1 +0,0 @@
-ALTER TABLE tax alter column validto set not null;
Deleted: trunk/sql/upgrade/3326-new_custom_fields_funcs.sql
===================================================================
--- trunk/sql/upgrade/3326-new_custom_fields_funcs.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3326-new_custom_fields_funcs.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,53 +0,0 @@
-
-
-CREATE OR REPLACE FUNCTION add_custom_field (VARCHAR, VARCHAR, VARCHAR)
-RETURNS BOOL AS
-'
-DECLARE
-table_name ALIAS FOR $1;
-new_field_name ALIAS FOR $2;
-field_datatype ALIAS FOR $3;
-
-BEGIN
- perform TABLE_ID FROM custom_table_catalog
- WHERE extends = table_name;
- IF NOT FOUND THEN
- BEGIN
- INSERT INTO custom_table_catalog (extends)
- VALUES (table_name);
- EXECUTE ''CREATE TABLE '' ||
- quote_ident(''custom_'' ||table_name) ||
- '' (row_id INT PRIMARY KEY)'';
- EXCEPTION WHEN duplicate_table THEN
- -- do nothing
- END;
- END IF;
- INSERT INTO custom_field_catalog (field_name, table_id)
- values (new_field_name, (SELECT table_id
- FROM custom_table_catalog
- WHERE extends = table_name));
- EXECUTE ''ALTER TABLE ''|| quote_ident(''custom_''||table_name) ||
- '' ADD COLUMN '' || quote_ident(new_field_name) || '' '' ||
- quote_ident(field_datatype);
- RETURN TRUE;
-END;
-' LANGUAGE PLPGSQL;
--- end function
-
-CREATE OR REPLACE FUNCTION drop_custom_field (VARCHAR, VARCHAR)
-RETURNS BOOL AS
-'
-DECLARE
-table_name ALIAS FOR $1;
-custom_field_name ALIAS FOR $2;
-BEGIN
- DELETE FROM custom_field_catalog
- WHERE field_name = custom_field_name AND
- table_id = (SELECT table_id FROM custom_table_catalog
- WHERE extends = table_name);
- EXECUTE ''ALTER TABLE '' || quote_ident(''custom_'' || table_name) ||
- '' DROP COLUMN '' || quote_ident(custom_field_name);
- RETURN TRUE;
-END;
-' LANGUAGE PLPGSQL;
--- end function
Deleted: trunk/sql/upgrade/3328-drop-location_result.sql
===================================================================
--- trunk/sql/upgrade/3328-drop-location_result.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3328-drop-location_result.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1 +0,0 @@
-drop type location_result cascade;
Deleted: trunk/sql/upgrade/3331-drop-bank-acct-save.sql
===================================================================
--- trunk/sql/upgrade/3331-drop-bank-acct-save.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3331-drop-bank-acct-save.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,6 +0,0 @@
-DROP FUNCTION eca__save_bank_account
-(in_entity_id int, in_credit_id int, in_bic text, in_iban text);
-
-DROP FUNCTION entity__save_bank_account
-(in_entity_id int, in_bic text, in_iban text);
-
Deleted: trunk/sql/upgrade/3333-location-function-drop.sql
===================================================================
Deleted: trunk/sql/upgrade/3335-drop-location_saves.sql
===================================================================
--- trunk/sql/upgrade/3335-drop-location_saves.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3335-drop-location_saves.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,17 +0,0 @@
-DROP function eca__location_save(
- in_credit_id int, in_location_id int,
- in_location_class int, in_line_one text, in_line_two text,
- in_line_three text, in_city TEXT, in_state TEXT, in_mail_code text,
- in_country_code int);
-
-DROP function person__save_location(
- in_entity_id int,
- in_location_id int,
- in_location_class int,
- in_line_one text,
- in_line_two text,
- in_line_three text,
- in_city TEXT,
- in_state TEXT,
- in_mail_code text,
- in_country_code int);
Deleted: trunk/sql/upgrade/3353-add-assembly-fkeys.sql
===================================================================
--- trunk/sql/upgrade/3353-add-assembly-fkeys.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3353-add-assembly-fkeys.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,2 +0,0 @@
-ALTER TABLE assembly ADD foreign key (id) REFERENCES parts(id);
-ALTER TABLE assembly ADD foreign key (parts_id) REFERENCES parts(id);
Deleted: trunk/sql/upgrade/3355-yearend-fkey.sql
===================================================================
--- trunk/sql/upgrade/3355-yearend-fkey.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3355-yearend-fkey.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1 +0,0 @@
-ALTER TABLE yearend ADD FOREIGN KEY (trans_id) REFERENCES gl(id);
Deleted: trunk/sql/upgrade/3356-fkeys.sql
===================================================================
--- trunk/sql/upgrade/3356-fkeys.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3356-fkeys.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,11 +0,0 @@
-ALTER TABLE partscustomer ALTER COLUMN credit_id drop not null;
-
-ALTER TABLE partscustomer
-ADD foreign key (pricegroup_id) references pricegroup(id);
-
-CREATE TABLE parts_translation () INHERITS (translation);
-ALTER TABLE parts_translation ADD foreign key (trans_id) REFERENCES parts(id);
-
-CREATE TABLE project_translation () INHERITS (translation);
-ALTER TABLE project_translation
-ADD foreign key (trans_id) REFERENCES project(id);
Deleted: trunk/sql/upgrade/3372-drop-location-delete.sql
===================================================================
--- trunk/sql/upgrade/3372-drop-location-delete.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3372-drop-location-delete.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1 +0,0 @@
-DROP FUNCTION person__delete_location (in_entity_id INT, in_location_id INT);
Deleted: trunk/sql/upgrade/3383-menu-attributes.sql
===================================================================
--- trunk/sql/upgrade/3383-menu-attributes.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3383-menu-attributes.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,8 +0,0 @@
-insert into menu_attribute(node_id, attribute, value)
-values (87, 'module', 'ic.pl');
-
-insert into menu_attribute(node_id, attribute, value)
-values (86, 'searchitems', 'all');
-
-insert into menu_attribute(node_id, attribute, value)
-values (86, 'action', 'search');
Deleted: trunk/sql/upgrade/3386-drop-type.sql
===================================================================
--- trunk/sql/upgrade/3386-drop-type.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3386-drop-type.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1 +0,0 @@
-DROP TYPE tax_form_report_detail_item CASCADE;
Deleted: trunk/sql/upgrade/3410-menu-functions.sql
===================================================================
--- trunk/sql/upgrade/3410-menu-functions.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3410-menu-functions.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,117 +0,0 @@
-CREATE OR REPLACE FUNCTION menu_generate() RETURNS SETOF menu_item AS
-$$
-DECLARE
- item menu_item;
- arg menu_attribute%ROWTYPE;
-BEGIN
- FOR item IN
- SELECT n.position, n.id, c.level, n.label, c.path,
- to_args(array[ma.attribute, ma.value])
- FROM connectby('menu_node', 'id', 'parent', 'position', '0',
- 0, ',')
- c(id integer, parent integer, "level" integer,
- path text, list_order integer)
- JOIN menu_node n USING(id)
- JOIN menu_attribute ma ON (n.id = ma.node_id)
- WHERE n.id IN (select node_id FROM menu_acl
- WHERE pg_has_role(CASE WHEN role_name
- ilike 'public'
- THEN current_user
- ELSE role_name
- END, 'USAGE')
- GROUP BY node_id
- HAVING bool_and(CASE WHEN acl_type ilike 'DENY'
- THEN FALSE
- WHEN acl_type ilike 'ALLOW'
- THEN TRUE
- END))
- or exists (select cn.id, cc.path
- FROM connectby('menu_node', 'id', 'parent',
- 'position', '0', 0, ',')
- cc(id integer, parent integer,
- "level" integer, path text,
- list_order integer)
- JOIN menu_node cn USING(id)
- WHERE cn.id IN
- (select node_id FROM menu_acl
- WHERE pg_has_role(CASE WHEN role_name
- ilike 'public'
- THEN current_user
- ELSE role_name
- END, 'USAGE')
- GROUP BY node_id
- HAVING bool_and(CASE WHEN acl_type
- ilike 'DENY'
- THEN false
- WHEN acl_type
- ilike 'ALLOW'
- THEN TRUE
- END))
- and cc.path like c.path || ',%')
- GROUP BY n.position, n.id, c.level, n.label, c.path, c.list_order
- ORDER BY c.list_order
-
- LOOP
- RETURN NEXT item;
- END LOOP;
-END;
-$$ language plpgsql;
-
-CREATE OR REPLACE FUNCTION menu_children(in_parent_id int) RETURNS SETOF menu_item
-AS $$
-declare
- item menu_item;
- arg menu_attribute%ROWTYPE;
-begin
- FOR item IN
- SELECT n.position, n.id, c.level, n.label, c.path,
- to_args(array[ma.attribute, ma.value])
- FROM connectby('menu_node', 'id', 'parent', 'position',
- in_parent_id, 1, ',')
- c(id integer, parent integer, "level" integer,
- path text, list_order integer)
- JOIN menu_node n USING(id)
- JOIN menu_attribute ma ON (n.id = ma.node_id)
- WHERE n.id IN (select node_id FROM menu_acl
- WHERE pg_has_role(CASE WHEN role_name
- ilike 'public'
- THEN current_user
- ELSE role_name
- END, 'USAGE')
- GROUP BY node_id
- HAVING bool_and(CASE WHEN acl_type ilike 'DENY'
- THEN FALSE
- WHEN acl_type ilike 'ALLOW'
- THEN TRUE
- END))
- or exists (select cn.id, cc.path
- FROM connectby('menu_node', 'id', 'parent',
- 'position', '0', 0, ',')
- cc(id integer, parent integer,
- "level" integer, path text,
- list_order integer)
- JOIN menu_node cn USING(id)
- WHERE cn.id IN
- (select node_id FROM menu_acl
- WHERE pg_has_role(CASE WHEN role_name
- ilike 'public'
- THEN current_user
- ELSE role_name
- END, 'USAGE')
- GROUP BY node_id
- HAVING bool_and(CASE WHEN acl_type
- ilike 'DENY'
- THEN false
- WHEN acl_type
- ilike 'ALLOW'
- THEN TRUE
- END))
- and cc.path like c.path || ',%')
- GROUP BY n.position, n.id, c.level, n.label, c.path, c.list_order
- ORDER BY c.list_order
- LOOP
- return next item;
- end loop;
-end;
-$$ language plpgsql;
-
Deleted: trunk/sql/upgrade/3421-tax_tables.sql
===================================================================
--- trunk/sql/upgrade/3421-tax_tables.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3421-tax_tables.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,13 +0,0 @@
-CREATE TABLE tax_extended (
- account_id int references account(id),
- tx_id int references transactions(id),
- reference text not null,
- tax_basis numeric,
- rate numeric,
- tax_amount numeric,
- check (tax_amount = rate*tax_basis/100)
-);
-
-COMMENT ON TABLE tax_extended IS
-$$ This stores extended information for manual tax calculations.$$;
-
Deleted: trunk/sql/upgrade/3422-tax_tables.sql
===================================================================
--- trunk/sql/upgrade/3422-tax_tables.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3422-tax_tables.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,7 +0,0 @@
-ALTER TABLE tax_extended DROP COLUMN account_id;
-ALTER TABLE tax_extended DROP COLUMN tx_id;
-ALTER TABLE tax_extended DROP COLUMN reference;
-ALTER TABLE tax_extended DROP COLUMN tax_amount;
-ALTER TABLE tax_extended ADD entry_id int primary key;
-ALTER TABLE tax_extended
-ADD FOREIGN KEY(entry_id) references acc_trans(entry_id);
Deleted: trunk/sql/upgrade/3441-periods-view.sql
===================================================================
--- trunk/sql/upgrade/3441-periods-view.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3441-periods-view.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,12 +0,0 @@
-
-CREATE OR REPLACE VIEW periods AS
-SELECT 'ytd' as id, 'Year to Date' as label, now()::date as date_to,
- (extract('year' from now())::text || '-01-01')::date as date_from
-UNION
-SELECT 'last_year', 'Last Year',
- ((extract('YEAR' from now()) - 1)::text || '-12-31')::date as date_to,
- ((extract('YEAR' from now()) - 1)::text || '-01-01')::date as date_from
-;
-
-GRANT SELECT ON periods TO public;
-
Deleted: trunk/sql/upgrade/3445-drop-save-user.sql
===================================================================
--- trunk/sql/upgrade/3445-drop-save-user.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3445-drop-save-user.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,2 +0,0 @@
-DROP FUNCTION admin__save_user
-(in_id int,in_entity_id INT, in_username text, in_password TEXT);
Deleted: trunk/sql/upgrade/3448-drop-location-search.sql
===================================================================
--- trunk/sql/upgrade/3448-drop-location-search.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3448-drop-location-search.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,7 +0,0 @@
-DROP FUNCTION location_search
-(in_companyname varchar, in_address1 varchar, in_address2 varchar,
- in_city varchar, in_state varchar, in_zipcode varchar,
- in_country varchar);
-
-DROP TYPE location_result CASCADE;
-
Deleted: trunk/sql/upgrade/3450-drop-user-function.sql
===================================================================
--- trunk/sql/upgrade/3450-drop-user-function.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3450-drop-user-function.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1 +0,0 @@
-DROP FUNCTION admin__delete_user (in_username TEXT);
Deleted: trunk/sql/upgrade/3455-asset-schema.sql
===================================================================
--- trunk/sql/upgrade/3455-asset-schema.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3455-asset-schema.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,135 +0,0 @@
-
-CREATE TABLE asset_unit_class (
- id int not null unique,
- class text primary key
-);
-
-INSERT INTO asset_unit_class (id, class) values (1, 'time');
-INSERT INTO asset_unit_class (id, class) values (2, 'production');
--- production-based depreciation is unlikely to be supported initially
-
-CREATE TABLE asset_dep_method(
- id serial unique not null,
- method text primary key,
- sproc text not null unique,
- unit_label text not null,
- short_name text not null unique,
- unit_class int not null references asset_unit_class(id)
-);
-
-comment on column asset_dep_method.method IS
-$$ These are keyed to specific stored procedures. Currently only "straight_line" is supported$$;
-
-INSERT INTO asset_dep_method(method, unit_class, sproc, unit_label, short_name)
-values ('Annual Straight Line Daily', 1, 'asset_dep_straight_line_yr_d', 'in years', 'SLYD');
-
-
-INSERT INTO asset_dep_method(method, unit_class, sproc, unit_label, short_name)
-values ('Whole Month Straight Line', 1, 'asset_dep_straight_line_whl_m',
-'in months', 'SLMM');
-
-INSERT INTO asset_dep_method(method, unit_class, sproc, unit_label, short_name)
-values ('Annual Straight Line Daily', 1, 'asset_dep_straight_line_yr_m', 'in years', 'SLYM');
-
-CREATE TABLE asset_class (
- id serial not null unique,
- label text primary key,
- asset_account_id int references account(id),
- dep_account_id int references account(id),
- method int references asset_dep_method(id)
-);
-
-COMMENT ON TABLE asset_class IS $$
-The account fields here set the defaults for the individual asset items. They
-are non-authoritative.
-$$;
-
-CREATE TABLE asset_disposal_method (
- label text primary key,
- id serial unique,
- multiple int check (multiple in (1, 0, -1)),
- short_label char(1)
-);
-
-INSERT INTO asset_disposal_method (label, multiple, short_label)
-values ('Abandonment', '0', 'A');
-INSERT INTO asset_disposal_method (label, multiple, short_label)
-values ('Sale', '1', 'S');
-
-CREATE TABLE asset_rl_to_disposal_method (
- report_id int references asset_report(id),
- asset_id int references asset_item(id),
- disposal_method_id int references asset_disposal_method(id),
- percent_disposed numeric,
- primary key (report_id, asset_id, disposal_method_id)
-);
-
-CREATE TABLE asset_item (
- id serial primary key, -- needed due to possible null in natural key
- description text,
- tag text not null,
- purchase_value numeric,
- salvage_value numeric,
- usable_life numeric,
- purchase_date date not null,
- start_depreciation date not null,
- location_id int references warehouse(id),
- department_id int references department(id),
- invoice_id int references ap(id),
- asset_account_id int references account(id),
- dep_account_id int references account(id),
- exp_account_id int references account(id),
- obsolete_by int references asset_item(id),
- asset_class_id int references asset_class(id),
- unique (tag, obsolete_by) -- part 1 of natural key enforcement
-);
-
-CREATE UNIQUE INDEX asset_item_active_tag_u ON asset_item(tag)
- WHERE obsolete_by is null; -- part 2 of natural key enforcement
-
-COMMENT ON column asset_item.tag IS $$ This can be plugged into other routines to generate it automatically via ALTER TABLE .... SET DEFAULT.....$$;
-
-CREATE TABLE asset_note (
- foreign key (ref_key) references asset_item(id),
- check (note_class = 4)
-) inherits (note);
-
-INSERT INTO note_class (id, class) values (4, 'Asset');
-ALTER TABLE asset_note alter column note_class set default 4;
-
-CREATE TABLE asset_report_class (
- id int not null unique,
- class text primary key
-);
-
-INSERT INTO asset_report_class (id, class) values (1, 'depreciation');
-INSERT INTO asset_report_class (id, class) values (2, 'disposal');
-INSERT INTO asset_report_class (id, class) values (3, 'import');
-INSERT INTO asset_report_class (id, class) values (4, 'partial disposal');
-
-CREATE TABLE asset_report (
- id serial primary key,
- report_date date,
- gl_id bigint references gl(id) unique,
- asset_class bigint references asset_class(id),
- report_class int references asset_report_class(id),
- entered_by bigint not null references entity(id),
- approved_by bigint references entity(id),
- entered_at timestamp default now(),
- approved_at timestamp,
- depreciated_qty numeric,
- dont_approve bool default false,
- submitted bool not null default false
-);
-
-CREATE TABLE asset_report_line(
- asset_id bigint references asset_item(id),
- report_id bigint references asset_report(id),
- amount numeric,
- department_id int references department(id),
- warehouse_id int references warehouse(id),
- PRIMARY KEY(asset_id, report_id)
-);
-
-COMMENT ON COLUMN asset_report_line.department_id IS
-$$ In case assets are moved between departments, we have to store this here.$$;
Deleted: trunk/sql/upgrade/3467-assets.sql
===================================================================
--- trunk/sql/upgrade/3467-assets.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3467-assets.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,10 +0,0 @@
-BEGIN;
-INSERT INTO account_link_description (description, summary, custom)
-VALUES
-('Asset_Dep', FALSE, FALSE),
-('Fixed_Asset', FALSE, FALSE),
-('asset_expense', FALSE, FALSE),
-('asset_gain', FALSE, FALSE),
-('asset_loss', FALSE, FALSE);
-
-
Deleted: trunk/sql/upgrade/3470-asset-menu.sql
===================================================================
--- trunk/sql/upgrade/3470-asset-menu.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3470-asset-menu.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,87 +0,0 @@
-BEGIN;
-
-CREATE TEMPORARY TABLE menu_track (token text, node_id int);
-
-INSERT INTO menu_track(node_id, token)
-values (menu_insert(0, 17, 'Fixed Assets'), 'asset_top');
-
-INSERT INTO menu_attribute (node_id, attribute, value)
-VALUES (currval('menu_node_id_seq')::int, 'menu', '1');
-
-INSERT INTO menu_track values ('asset_class', menu_insert((SELECT node_id from menu_track where token = 'asset_top'), 1, 'Asset Classes'));
-
-INSERT INTO menu_attribute (node_id, attribute, value)
-VALUES (currval('menu_node_id_seq')::int, 'menu', '1');
-
-INSERT INTO menu_track values ('asset_item', menu_insert((SELECT node_id from menu_track where token = 'asset_top'), 2, 'Assets'));
-
-INSERT INTO menu_attribute (node_id, attribute, value)
-VALUES (currval('menu_node_id_seq')::int, 'menu', '1');
-
-
-SELECT menu_insert((SELECT node_id from menu_track where token = 'asset_class'), 1, 'Add Class');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq'), 'module', 'assets.pl');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq'), 'action', 'asset_category_screen');
-
-SELECT menu_insert((SELECT node_id from menu_track where token = 'asset_class'), 2, 'List Classes');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq'), 'module', 'assets.pl');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq'), 'action', 'asset_category_search');
-
-
-SELECT menu_insert((SELECT node_id from menu_track where token = 'asset_item'), 1, 'Add Assets');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq'), 'module', 'assets.pl');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq'), 'action', 'asset_screen');
-
-SELECT menu_insert((SELECT node_id from menu_track where token = 'asset_items'), 2, 'Search Assets');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq'), 'module', 'assets.pl');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq'), 'action', 'asset_search');
-
-SELECT menu_insert(
- (SELECT id FROM menu_node WHERE parent = (select id from menu_node
- where position = 17
- and parent = 0)
- AND position=2), 3, 'Depreciate');
-
-INSERT INTO menu_attribute (node_id, attribute, value)
-values (currval('menu_node_id_seq'), 'module', 'asset.pl');
-INSERT INTO menu_attribute (node_id, attribute, value)
-values (currval('menu_node_id_seq'), 'action', 'new_report');
-INSERT INTO menu_attribute (node_id, attribute, value)
-values (currval('menu_node_id_seq'), 'depreciate', '1');
-
-SELECT menu_insert(
- (select id FROM menu_node
- where parent = (select id from menu_node
- where parent = 0 and position = 17
- and label = 'Fixed Assets')
- and position = 2),
- 2, 'Import');
-
-INSERT INTO menu_attribute (node_id, attribute, value)
-VALUES (currval('menu_node_id_seq')::int, 'module', 'asset.pl');
-INSERT INTO menu_attribute (node_id, attribute, value)
-VALUES (currval('menu_node_id_seq')::int, 'action', 'import');
-
-SELECT menu_insert(
- (SELECT id FROM menu_node WHERE parent = (select id from menu_node
- where position = 17
- and parent = 0)
- AND position=2), 10, 'Reports');
-
-INSERT INTO menu_attribute (node_id, attribute, value)
-values (currval('menu_node_id_seq'), 'menu', '1');
-select menu_insert(currval('menu_node_id_seq')::int, 1, 'Net Book Value');
-INSERT INTO menu_attribute (node_id, attribute, value)
-values (currval('menu_node_id_seq'), 'module', 'asset.pl');
-INSERT INTO menu_attribute (node_id, attribute, value)
-values (currval('menu_node_id_seq'), 'action', 'display_nbv');
-
-COMMIT;
Deleted: trunk/sql/upgrade/3476-drop-unused-fields.sql
===================================================================
--- trunk/sql/upgrade/3476-drop-unused-fields.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3476-drop-unused-fields.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,9 +0,0 @@
-BEGIN;
-
-\echo This may fail on a fairly new database. In these cases, failures and
-\echo rollbacks are expected and normal.
-
-alter table entity_credit_account drop cc;
-alter table entity_credit_account drop bcc;
-
-COMMIT;
Deleted: trunk/sql/upgrade/3478-files.sql
===================================================================
--- trunk/sql/upgrade/3478-files.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3478-files.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,148 +0,0 @@
-BEGIN;
-
-CREATE TABLE mime_type (
- id serial not null unique,
- mime_type text primary key
-);
-
-COMMENT ON TABLE mime_type IS
-$$ This is a lookup table for storing MIME types.$$;
-
-CREATE TABLE file_class (
- id serial not null unique,
- class text primary key
-);
-
-insert into file_class values (1, 'transaction');
-insert into file_class values (2, 'order');
-
-COMMENT ON TABLE file_class IS
-$$ File classes are collections of files attached against rows in specific
-tables in the database. They can be used in the future to implement other form
-of file attachment. $$;
-
-CREATE TABLE file_base (
- content bytea NOT NULL,
- mime_type_id int not null references mime_type(id),
- file_name text not null,
- description text,
- uploaded_by int not null default person__get_my_entity_id()
- references entity(id),
- uploaded_at timestamp not null default now(),
- id serial not null unique,
- ref_key int not null,
- file_class int not null references file_class(id),
- primary key (ref_key, file_name, file_class)
-);
-
-COMMENT ON TABLE file_base IS
-$$Abstract table, holds no records. Inheriting table store actual file
-attachment data. Can be queried however to retrieve lists of all files. $$;
-
-COMMENT ON COLUMN file_base.ref_key IS
-$$This column inheriting tables is used to reference the database row for the
-attachment. Inheriting tables MUST set the foreign key here appropriately.
-
-This can also be used to create classifications of other documents, such as by
-source of automatic import (where the file is not yet attached) or
-even standard,
-long-lived documents.$$;
-
-CREATE TABLE file_transaction (
- check (file_class = 1),
- unique(id),
- primary key (ref_key, file_name, file_class),
- foreign key (ref_key) REFERENCES transactions(id)
-) inherits (file_base);
-
-COMMENT ON TABLE file_transaction IS
-$$ File attachments primarily attached to AR/AP/GL.$$;
-
-CREATE TABLE file_order (
- check (file_class=2),
- unique(id),
- primary key (ref_key, file_name, file_class),
- foreign key (ref_key) references oe(id)
-) inherits (file_base);
-
-COMMENT ON TABLE file_transaction IS
-$$ File attachments primarily attached to orders and quotatoins.$$;
-
-
-CREATE TABLE file_secondary_attachment (
- file_id int not null,
- source_class int references file_class(id),
- ref_key int not null,
- dest_class int references file_class(id),
- attached_by int not null references entity(id),
- attached_at timestamp not null default now()
-);
-
-COMMENT ON TABLE file_secondary_attachment IS
-$$Another abstract table. This one will use rewrite rules to make inserts safe
-because of the difficulty in managing inserts otherwise. Inheriting tables
-provide secondary links between the file and other database objects.
-
-Due to the nature of database inheritance and unique constraints
-in PostgreSQL, this must be partitioned in a star format.$$;
-
-CREATE TABLE file_tx_to_order (
- foreign key (file_id) references file_transaction(id),
- foreign key (ref_key) references oe(id),
- check (source_class = 1),
- check (dest_class = 2)
-) INHERITS (file_secondary_attachment);
-
-CREATE RULE file_sec_insert_tx_oe AS ON INSERT TO file_secondary_attachment
-WHERE source_class = 1 and dest_class = 2
-DO INSTEAD
-INSERT INTO file_tx_to_order(file_id, source_class, ref_key, dest_class,
-attached_by, attached_at)
-VALUES (new.file_id, 1, new.ref_key, 2,
- coalesce(new.attached_by, person__get_my_entity_id()),
- coalesce(new.attached_at, now()));
-
-COMMENT ON TABLE file_tx_to_order IS
-$$ Secondary links from transactions to orders.$$;
-
-CREATE TABLE file_order_to_order (
- foreign key (file_id) references file_order(id),
- foreign key (ref_key) references oe(id),
- check (source_class = 2),
- check (dest_class = 2)
-) INHERITS (file_secondary_attachment);
-
-COMMENT ON TABLE file_order_to_order IS
-$$ Secondary links from one order to another, for example to support order
-consolidation.$$;
-
-CREATE RULE file_sec_insert_oe_oe AS ON INSERT TO file_secondary_attachment
-WHERE source_class = 2 and dest_class = 2
-DO INSTEAD
-INSERT INTO file_order_to_order(file_id, source_class, ref_key, dest_class,
-attached_by, attached_at)
-VALUES (new.file_id, 2, new.ref_key, 2,
- coalesce(new.attached_by, person__get_my_entity_id()),
- coalesce(new.attached_at, now()));
-
-CREATE TABLE file_order_to_tx (
- foreign key (file_id) references file_order(id),
- foreign key (ref_key) references transactions(id),
- check (source_class = 2),
- check (dest_class = 1)
-) INHERITS (file_secondary_attachment);
-
-COMMENT ON TABLE file_order_to_tx IS
-$$ Secondary links from orders to transactions, for example to track files when
-invoices are generated from orders.$$;
-
-CREATE RULE file_sec_insert_oe_tx AS ON INSERT TO file_secondary_attachment
-WHERE source_class = 2 and dest_class = 1
-DO INSTEAD
-INSERT INTO file_order_to_order(file_id, source_class, ref_key, dest_class,
-attached_by, attached_at)
-VALUES (new.file_id, 2, new.ref_key, 1,
- coalesce(new.attached_by, person__get_my_entity_id()),
- coalesce(new.attached_at, now()));
-
-COMMIT;
Deleted: trunk/sql/upgrade/3479-inheritance_pkeys.sql
===================================================================
--- trunk/sql/upgrade/3479-inheritance_pkeys.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3479-inheritance_pkeys.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,6 +0,0 @@
-alter table entity_note add primary key(id);
-alter table eca_note add primary key(id);
-alter table invoice_note add primary key(id);
-
-alter table parts_translation add PRIMARY KEY (trans_id, language_code);
-alter table project_translation add PRIMARY KEY (trans_id, language_code);
Deleted: trunk/sql/upgrade/3480-pkeys-2.sql
===================================================================
--- trunk/sql/upgrade/3480-pkeys-2.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3480-pkeys-2.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,12 +0,0 @@
-ALTER TABLE file_secondary_attachment
- ADD PRIMARY KEY(file_id, source_class, dest_class, ref_key);
-
-ALTER TABLE file_tx_to_order
- ADD PRIMARY KEY(file_id, source_class, dest_class, ref_key);
-
-ALTER TABLE file_order_to_order
- ADD PRIMARY KEY(file_id, source_class, dest_class, ref_key);
-
-ALTER TABLE file_order_to_tx
- ADD PRIMARY KEY(file_id, source_class, dest_class, ref_key);
-
Deleted: trunk/sql/upgrade/3482-file_view_catelog.sql
===================================================================
--- trunk/sql/upgrade/3482-file_view_catelog.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3482-file_view_catelog.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,4 +0,0 @@
-CREATE TABLE file_view_catalog (
- file_class int references file_class(id) primary key,
- view_name text not null unique
-);
Deleted: trunk/sql/upgrade/3495_drop_mime_func.sql
===================================================================
--- trunk/sql/upgrade/3495_drop_mime_func.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3495_drop_mime_func.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1 +0,0 @@
-DROP FUNCTION file__get_mime_type(in_mime_type_id int);
Deleted: trunk/sql/upgrade/3497-schema-changes.sql
===================================================================
--- trunk/sql/upgrade/3497-schema-changes.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3497-schema-changes.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,8 +0,0 @@
-ALTER TABLE invoice ADD FOREIGN KEY (trans_id) REFERENCES transactions(id);
-ALTER TABLE invoice ADD FOREIGN KEY (parts_id) REFERENCES parts(id);
-
-ALTER TABLE tax ADD FOREIGN KEY (chart_id) REFERENCES account(id);
-CREATE TRIGGER ap_audit_trail AFTER insert or update or delete ON ap
-FOR EACH ROW EXECUTE PROCEDURE gl_audit_trail_append();
-
-
Deleted: trunk/sql/upgrade/3509-drop-function.sql
===================================================================
--- trunk/sql/upgrade/3509-drop-function.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3509-drop-function.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,4 +0,0 @@
-DROP FUNCTION eca__get_location(
- in_credit_id int,
- in_class text
-);
Deleted: trunk/sql/upgrade/3532-drop-used-function.sql
===================================================================
--- trunk/sql/upgrade/3532-drop-used-function.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3532-drop-used-function.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,3 +0,0 @@
-DROP FUNCTION person__all_locations (
- in_entity_id int
-);
Deleted: trunk/sql/upgrade/3534-drop_unused_function.sql
===================================================================
--- trunk/sql/upgrade/3534-drop_unused_function.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3534-drop_unused_function.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,2 +0,0 @@
-
-DROP FUNCTION employee_delete (in_id integer);
Deleted: trunk/sql/upgrade/3536-menu-update.sql
===================================================================
--- trunk/sql/upgrade/3536-menu-update.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3536-menu-update.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1 +0,0 @@
-update menu_attribute set value = 'asset.pl' where value = 'assets.pl';
Deleted: trunk/sql/upgrade/3537-note-table.sql
===================================================================
--- trunk/sql/upgrade/3537-note-table.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3537-note-table.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,2 +0,0 @@
-alter table note alter column vector set default '';
-
Deleted: trunk/sql/upgrade/3538-asset-menu-fix.sql
===================================================================
--- trunk/sql/upgrade/3538-asset-menu-fix.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3538-asset-menu-fix.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,11 +0,0 @@
-UPDATE menu_attribute set attribute = 'depreciation'
- where attribute = 'depreciate';
-
-SELECT menu_insert(parent, position + 1, 'Disposal')
- FROM menu_node
- WHERE label = 'Depreciate';
-
-INSERT INTO menu_attribute(attribute, value, node_id)
- VALUES ('module', 'asset.pl', currval('menu_node_id_seq'));
-INSERT INTO menu_attribute(attribute, value, node_id)
- VALUES ('action', 'new_report', currval('menu_node_id_seq'));
Deleted: trunk/sql/upgrade/3547-constraints-upgrade.sql
===================================================================
--- trunk/sql/upgrade/3547-constraints-upgrade.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3547-constraints-upgrade.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,16 +0,0 @@
-ALTER TABLE audittrail DROP CONSTRAINT "audittrail_person_id_fkey";
-
-\echo If the update below fails, it may be because the table is set up correctly
-\echo already. It's safe to ignore constraint errors there.
---'
-UPDATE audittrail
- SET person_id = (select entity_id from person where id = person_id);
-
-\echo If the alter table below fails, there is something wrong. Please correct
-\echo before proceding.
-ALTER TABLE audittrail ADD FOREIGN KEY (person_id) REFERENCES person(entity_id);
-
-ALTER TABLE lsmb_roles DROP CONSTRAINT "lsmb_roles_user_id_fkey";
-
-ALTER TABLE lsmb_roles ADD foreign key (user_id) references users(id)
- ON DELETE CASCADE;
Deleted: trunk/sql/upgrade/3551-asset-approval-menu.sql
===================================================================
--- trunk/sql/upgrade/3551-asset-approval-menu.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3551-asset-approval-menu.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,29 +0,0 @@
-BEGIN;
-
-SELECT setval('menu_node_id_seq', max(id)) from menu_node;
-SELECT setval('menu_attribute_id_seq', max(id)) from menu_attribute;
-
-SELECT * FROM menu_insert(236, 2, 'Depreciation');
-
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq')::int, 'module', 'asset.pl');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq')::int, 'action', 'search_reports');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq')::int, 'depreciation', '1');
-
-INSERT INTO menu_acl(node_id, acl_type, role_name)
-values (currval('menu_node_id_seq')::int, 'allow',
- 'lsmb_' || current_database() || '__assets_approve');
-
-SELECT * FROM menu_insert(236, 3, 'Disposal');
-
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq')::int, 'module', 'asset.pl');
-INSERT INTO menu_attribute(node_id, attribute, value)
-VALUES (currval('menu_node_id_seq')::int, 'action', 'search_reports');
-INSERT INTO menu_acl(node_id, acl_type, role_name)
-values (currval('menu_node_id_seq')::int, 'allow',
- 'lsmb_' || current_database() || '__assets_approve');
-
-COMMIT;
Deleted: trunk/sql/upgrade/3560-settings.sql
===================================================================
--- trunk/sql/upgrade/3560-settings.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3560-settings.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,3 +0,0 @@
-
-DROP FUNCTION setting_set(varchar, varchar);
-DROP FUNCTION setting_get(varchar);
Deleted: trunk/sql/upgrade/3572-letterhead-template-editing.sql
===================================================================
--- trunk/sql/upgrade/3572-letterhead-template-editing.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3572-letterhead-template-editing.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,16 +0,0 @@
--- Copy Letterhead HTML and TeX menus from their respective Invoice counterparts
-insert into menu_node (id, label, parent, position) values (241, 'Letterhead', 159, 16);
-insert into menu_node (id, label, parent, position) values (242, 'Letterhead', 172, 16);
-
-
-insert into menu_attribute
- select 241 as node_id, attribute, value from menu_attribute where node_id = 159;
-insert into menu_attribute
- select 242 as node_id, attribute, value from menu_attribute where node_id = 173;
-
-insert into menu_acl
- select nextval('menu_acl_id_seq'), role_name, acl_type, 241 as node_id
- from menu_acl where node_id = 159;
-insert into menu_acl
- select nextval('menu_acl_id_seq'), role_name, acl_type, 242 as node_id
- from menu_acl where node_id = 173;
Deleted: trunk/sql/upgrade/3585-mime-type-data.sql
===================================================================
--- trunk/sql/upgrade/3585-mime-type-data.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3585-mime-type-data.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,599 +0,0 @@
-INSERT INTO mime_type (mime_type) VALUES('all/all');
-INSERT INTO mime_type (mime_type) VALUES('all/allfiles');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-flac');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-ape');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-scpls');
-INSERT INTO mime_type (mime_type) VALUES('audio/mp4');
-INSERT INTO mime_type (mime_type) VALUES('audio/mpeg');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-iriver-pla');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-speex+ogg');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-mod');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-tta');
-INSERT INTO mime_type (mime_type) VALUES('audio/annodex');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-mo3');
-INSERT INTO mime_type (mime_type) VALUES('audio/midi');
-INSERT INTO mime_type (mime_type) VALUES('audio/mp2');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-musepack');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-minipsf');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-mpegurl');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-aiff');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-xm');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-aifc');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-m4b');
-INSERT INTO mime_type (mime_type) VALUES('audio/aac');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-psflib');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-pn-realaudio-plugin');
-INSERT INTO mime_type (mime_type) VALUES('audio/basic');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-ms-wma');
-INSERT INTO mime_type (mime_type) VALUES('audio/AMR-WB');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-riff');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-psf');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-adpcm');
-INSERT INTO mime_type (mime_type) VALUES('audio/ogg');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-wav');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-matroska');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-voc');
-INSERT INTO mime_type (mime_type) VALUES('audio/ac3');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-flac+ogg');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-aiffc');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-it');
-INSERT INTO mime_type (mime_type) VALUES('audio/AMR');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-s3m');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-speex');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-wavpack');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-xi');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-xmf');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-wavpack-correction');
-INSERT INTO mime_type (mime_type) VALUES('audio/prs.sid');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-gsm');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-ms-asx');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-vorbis+ogg');
-INSERT INTO mime_type (mime_type) VALUES('audio/x-stm');
-INSERT INTO mime_type (mime_type) VALUES('x-epoc/x-sisx-app');
-INSERT INTO mime_type (mime_type) VALUES('image/x-fpx');
-INSERT INTO mime_type (mime_type) VALUES('image/x-panasonic-raw');
-INSERT INTO mime_type (mime_type) VALUES('image/x-xwindowdump');
-INSERT INTO mime_type (mime_type) VALUES('image/x-nikon-nef');
-INSERT INTO mime_type (mime_type) VALUES('image/x-niff');
-INSERT INTO mime_type (mime_type) VALUES('image/x-pict');
-INSERT INTO mime_type (mime_type) VALUES('image/svg+xml-compressed');
-INSERT INTO mime_type (mime_type) VALUES('image/jp2');
-INSERT INTO mime_type (mime_type) VALUES('image/x-msod');
-INSERT INTO mime_type (mime_type) VALUES('image/x-dds');
-INSERT INTO mime_type (mime_type) VALUES('image/x-olympus-orf');
-INSERT INTO mime_type (mime_type) VALUES('image/x-portable-graymap');
-INSERT INTO mime_type (mime_type) VALUES('image/x-skencil');
-INSERT INTO mime_type (mime_type) VALUES('image/x-sony-srf');
-INSERT INTO mime_type (mime_type) VALUES('image/x-dib');
-INSERT INTO mime_type (mime_type) VALUES('image/x-emf');
-INSERT INTO mime_type (mime_type) VALUES('image/x-eps');
-INSERT INTO mime_type (mime_type) VALUES('image/ief');
-INSERT INTO mime_type (mime_type) VALUES('image/x-pcx');
-INSERT INTO mime_type (mime_type) VALUES('image/x-gzeps');
-INSERT INTO mime_type (mime_type) VALUES('image/x-xcf');
-INSERT INTO mime_type (mime_type) VALUES('image/x-portable-pixmap');
-INSERT INTO mime_type (mime_type) VALUES('image/x-kde-raw');
-INSERT INTO mime_type (mime_type) VALUES('image/openraster');
-INSERT INTO mime_type (mime_type) VALUES('image/x-macpaint');
-INSERT INTO mime_type (mime_type) VALUES('image/x-wmf');
-INSERT INTO mime_type (mime_type) VALUES('image/x-win-bitmap');
-INSERT INTO mime_type (mime_type) VALUES('image/x-sgi');
-INSERT INTO mime_type (mime_type) VALUES('image/x-ilbm');
-INSERT INTO mime_type (mime_type) VALUES('image/x-sony-sr2');
-INSERT INTO mime_type (mime_type) VALUES('image/x-sigma-x3f');
-INSERT INTO mime_type (mime_type) VALUES('image/x-bzeps');
-INSERT INTO mime_type (mime_type) VALUES('image/x-icns');
-INSERT INTO mime_type (mime_type) VALUES('image/g3fax');
-INSERT INTO mime_type (mime_type) VALUES('image/x-applix-graphics');
-INSERT INTO mime_type (mime_type) VALUES('image/x-xcursor');
-INSERT INTO mime_type (mime_type) VALUES('image/x-kodak-dcr');
-INSERT INTO mime_type (mime_type) VALUES('image/x-hdr');
-INSERT INTO mime_type (mime_type) VALUES('image/x-cmu-raster');
-INSERT INTO mime_type (mime_type) VALUES('image/x-sun-raster');
-INSERT INTO mime_type (mime_type) VALUES('image/fax-g3');
-INSERT INTO mime_type (mime_type) VALUES('image/x-kodak-kdc');
-INSERT INTO mime_type (mime_type) VALUES('image/jpeg');
-INSERT INTO mime_type (mime_type) VALUES('image/tiff');
-INSERT INTO mime_type (mime_type) VALUES('image/dpx');
-INSERT INTO mime_type (mime_type) VALUES('image/x-dcraw');
-INSERT INTO mime_type (mime_type) VALUES('image/x-adobe-dng');
-INSERT INTO mime_type (mime_type) VALUES('image/x-canon-crw');
-INSERT INTO mime_type (mime_type) VALUES('image/bmp');
-INSERT INTO mime_type (mime_type) VALUES('image/x-xfig');
-INSERT INTO mime_type (mime_type) VALUES('image/x-lwo');
-INSERT INTO mime_type (mime_type) VALUES('image/x-fuji-raf');
-INSERT INTO mime_type (mime_type) VALUES('image/x-xbitmap');
-INSERT INTO mime_type (mime_type) VALUES('image/x-pentax-pef');
-INSERT INTO mime_type (mime_type) VALUES('image/x-exr');
-INSERT INTO mime_type (mime_type) VALUES('image/rle');
-INSERT INTO mime_type (mime_type) VALUES('image/x-3ds');
-INSERT INTO mime_type (mime_type) VALUES('image/svg+xml');
-INSERT INTO mime_type (mime_type) VALUES('image/x-lws');
-INSERT INTO mime_type (mime_type) VALUES('image/x-tga');
-INSERT INTO mime_type (mime_type) VALUES('image/x-compressed-xcf');
-INSERT INTO mime_type (mime_type) VALUES('image/fits');
-INSERT INTO mime_type (mime_type) VALUES('image/x-kodak-k25');
-INSERT INTO mime_type (mime_type) VALUES('image/x-portable-bitmap');
-INSERT INTO mime_type (mime_type) VALUES('image/x-quicktime');
-INSERT INTO mime_type (mime_type) VALUES('image/x-sony-arw');
-INSERT INTO mime_type (mime_type) VALUES('image/x-xpixmap');
-INSERT INTO mime_type (mime_type) VALUES('image/gif');
-INSERT INTO mime_type (mime_type) VALUES('image/x-portable-anymap');
-INSERT INTO mime_type (mime_type) VALUES('image/x-jng');
-INSERT INTO mime_type (mime_type) VALUES('image/x-iff');
-INSERT INTO mime_type (mime_type) VALUES('image/x-canon-cr2');
-INSERT INTO mime_type (mime_type) VALUES('image/cgm');
-INSERT INTO mime_type (mime_type) VALUES('image/x-photo-cd');
-INSERT INTO mime_type (mime_type) VALUES('image/png');
-INSERT INTO mime_type (mime_type) VALUES('image/x-minolta-mrw');
-INSERT INTO mime_type (mime_type) VALUES('image/x-rgb');
-INSERT INTO mime_type (mime_type) VALUES('image/x-pic');
-INSERT INTO mime_type (mime_type) VALUES('message/disposition-notification');
-INSERT INTO mime_type (mime_type) VALUES('message/news');
-INSERT INTO mime_type (mime_type) VALUES('message/partial');
-INSERT INTO mime_type (mime_type) VALUES('message/x-gnu-rmail');
-INSERT INTO mime_type (mime_type) VALUES('message/delivery-status');
-INSERT INTO mime_type (mime_type) VALUES('message/external-body');
-INSERT INTO mime_type (mime_type) VALUES('message/rfc822');
-INSERT INTO mime_type (mime_type) VALUES('uri/mmst');
-INSERT INTO mime_type (mime_type) VALUES('uri/rtspu');
-INSERT INTO mime_type (mime_type) VALUES('uri/pnm');
-INSERT INTO mime_type (mime_type) VALUES('uri/mmsu');
-INSERT INTO mime_type (mime_type) VALUES('uri/rtspt');
-INSERT INTO mime_type (mime_type) VALUES('uri/mms');
-INSERT INTO mime_type (mime_type) VALUES('text/x-tcl');
-INSERT INTO mime_type (mime_type) VALUES('text/directory');
-INSERT INTO mime_type (mime_type) VALUES('text/htmlh');
-INSERT INTO mime_type (mime_type) VALUES('text/x-literate-haskell');
-INSERT INTO mime_type (mime_type) VALUES('text/xmcd');
-INSERT INTO mime_type (mime_type) VALUES('text/x-ms-regedit');
-INSERT INTO mime_type (mime_type) VALUES('text/x-microdvd');
-INSERT INTO mime_type (mime_type) VALUES('text/x-erlang');
-INSERT INTO mime_type (mime_type) VALUES('text/x-ssa');
-INSERT INTO mime_type (mime_type) VALUES('text/plain');
-INSERT INTO mime_type (mime_type) VALUES('text/spreadsheet');
-INSERT INTO mime_type (mime_type) VALUES('text/sgml');
-INSERT INTO mime_type (mime_type) VALUES('text/x-uil');
-INSERT INTO mime_type (mime_type) VALUES('text/x-troff-mm');
-INSERT INTO mime_type (mime_type) VALUES('text/x-gettext-translation');
-INSERT INTO mime_type (mime_type) VALUES('text/x-vhdl');
-INSERT INTO mime_type (mime_type) VALUES('text/x-java');
-INSERT INTO mime_type (mime_type) VALUES('text/x-nfo');
-INSERT INTO mime_type (mime_type) VALUES('text/csv');
-INSERT INTO mime_type (mime_type) VALUES('text/x-install');
-INSERT INTO mime_type (mime_type) VALUES('text/x-c++src');
-INSERT INTO mime_type (mime_type) VALUES('text/x-subviewer');
-INSERT INTO mime_type (mime_type) VALUES('text/x-adasrc');
-INSERT INTO mime_type (mime_type) VALUES('text/x-dsl');
-INSERT INTO mime_type (mime_type) VALUES('text/x-chdr');
-INSERT INTO mime_type (mime_type) VALUES('text/calendar');
-INSERT INTO mime_type (mime_type) VALUES('text/x-csharp');
-INSERT INTO mime_type (mime_type) VALUES('text/x-lua');
-INSERT INTO mime_type (mime_type) VALUES('text/x-ocaml');
-INSERT INTO mime_type (mime_type) VALUES('text/x-iMelody');
-INSERT INTO mime_type (mime_type) VALUES('text/enriched');
-INSERT INTO mime_type (mime_type) VALUES('text/richtext');
-INSERT INTO mime_type (mime_type) VALUES('text/x-objchdr');
-INSERT INTO mime_type (mime_type) VALUES('text/x-makefile');
-INSERT INTO mime_type (mime_type) VALUES('text/x-copying');
-INSERT INTO mime_type (mime_type) VALUES('text/x-pascal');
-INSERT INTO mime_type (mime_type) VALUES('text/x-credits');
-INSERT INTO mime_type (mime_type) VALUES('text/x-mup');
-INSERT INTO mime_type (mime_type) VALUES('text/x-opml+xml');
-INSERT INTO mime_type (mime_type) VALUES('text/x-rpm-spec');
-INSERT INTO mime_type (mime_type) VALUES('text/x-xmi');
-INSERT INTO mime_type (mime_type) VALUES('text/x-dsrc');
-INSERT INTO mime_type (mime_type) VALUES('text/x-patch');
-INSERT INTO mime_type (mime_type) VALUES('text/x-authors');
-INSERT INTO mime_type (mime_type) VALUES('text/x-ldif');
-INSERT INTO mime_type (mime_type) VALUES('text/x-moc');
-INSERT INTO mime_type (mime_type) VALUES('text/x-tex');
-INSERT INTO mime_type (mime_type) VALUES('text/x-dcl');
-INSERT INTO mime_type (mime_type) VALUES('text/x-python');
-INSERT INTO mime_type (mime_type) VALUES('text/x-lilypond');
-INSERT INTO mime_type (mime_type) VALUES('text/x-katefilelist');
-INSERT INTO mime_type (mime_type) VALUES('text/troff');
-INSERT INTO mime_type (mime_type) VALUES('text/x-hex');
-INSERT INTO mime_type (mime_type) VALUES('text/x-google-video-pointer');
-INSERT INTO mime_type (mime_type) VALUES('text/x-haskell');
-INSERT INTO mime_type (mime_type) VALUES('text/x-ocl');
-INSERT INTO mime_type (mime_type) VALUES('text/x-idl');
-INSERT INTO mime_type (mime_type) VALUES('text/x-troff-me');
-INSERT INTO mime_type (mime_type) VALUES('text/x-bibtex');
-INSERT INTO mime_type (mime_type) VALUES('text/x-sql');
-INSERT INTO mime_type (mime_type) VALUES('text/x-emacs-lisp');
-INSERT INTO mime_type (mime_type) VALUES('text/x-eiffel');
-INSERT INTO mime_type (mime_type) VALUES('text/css');
-INSERT INTO mime_type (mime_type) VALUES('text/x-fortran');
-INSERT INTO mime_type (mime_type) VALUES('text/x-xslfo');
-INSERT INTO mime_type (mime_type) VALUES('text/x-matlab');
-INSERT INTO mime_type (mime_type) VALUES('text/x-uri');
-INSERT INTO mime_type (mime_type) VALUES('text/x-setext');
-INSERT INTO mime_type (mime_type) VALUES('text/x-readme');
-INSERT INTO mime_type (mime_type) VALUES('text/x-troff-ms');
-INSERT INTO mime_type (mime_type) VALUES('text/x-cmake');
-INSERT INTO mime_type (mime_type) VALUES('text/tab-separated-values');
-INSERT INTO mime_type (mime_type) VALUES('text/x-log');
-INSERT INTO mime_type (mime_type) VALUES('text/x-mpsub');
-INSERT INTO mime_type (mime_type) VALUES('text/x-mof');
-INSERT INTO mime_type (mime_type) VALUES('text/html');
-INSERT INTO mime_type (mime_type) VALUES('text/x-txt2tags');
-INSERT INTO mime_type (mime_type) VALUES('text/x-csrc');
-INSERT INTO mime_type (mime_type) VALUES('text/rfc822-headers');
-INSERT INTO mime_type (mime_type) VALUES('text/x-mrml');
-INSERT INTO mime_type (mime_type) VALUES('text/x-vala');
-INSERT INTO mime_type (mime_type) VALUES('text/x-iptables');
-INSERT INTO mime_type (mime_type) VALUES('text/x-c++hdr');
-INSERT INTO mime_type (mime_type) VALUES('text/x-scheme');
-INSERT INTO mime_type (mime_type) VALUES('text/x-texinfo');
-INSERT INTO mime_type (mime_type) VALUES('text/x-objcsrc');
-INSERT INTO mime_type (mime_type) VALUES('text/x-changelog');
-INSERT INTO mime_type (mime_type) VALUES('x-content/audio-dvd');
-INSERT INTO mime_type (mime_type) VALUES('x-content/video-svcd');
-INSERT INTO mime_type (mime_type) VALUES('x-content/video-hddvd');
-INSERT INTO mime_type (mime_type) VALUES('x-content/blank-dvd');
-INSERT INTO mime_type (mime_type) VALUES('x-content/video-vcd');
-INSERT INTO mime_type (mime_type) VALUES('x-content/unix-software');
-INSERT INTO mime_type (mime_type) VALUES('x-content/blank-cd');
-INSERT INTO mime_type (mime_type) VALUES('x-content/audio-cdda');
-INSERT INTO mime_type (mime_type) VALUES('x-content/win32-software');
-INSERT INTO mime_type (mime_type) VALUES('x-content/blank-hddvd');
-INSERT INTO mime_type (mime_type) VALUES('x-content/audio-player');
-INSERT INTO mime_type (mime_type) VALUES('x-content/video-dvd');
-INSERT INTO mime_type (mime_type) VALUES('x-content/image-picturecd');
-INSERT INTO mime_type (mime_type) VALUES('x-content/blank-bd');
-INSERT INTO mime_type (mime_type) VALUES('x-content/video-bluray');
-INSERT INTO mime_type (mime_type) VALUES('x-content/image-dcf');
-INSERT INTO mime_type (mime_type) VALUES('x-content/software');
-INSERT INTO mime_type (mime_type) VALUES('model/vrml');
-INSERT INTO mime_type (mime_type) VALUES('fonts/package');
-INSERT INTO mime_type (mime_type) VALUES('application/x-hwp');
-INSERT INTO mime_type (mime_type) VALUES('application/x-pkcs7-certificates');
-INSERT INTO mime_type (mime_type) VALUES('application/x-shockwave-flash');
-INSERT INTO mime_type (mime_type) VALUES('application/x-turtle');
-INSERT INTO mime_type (mime_type) VALUES('application/x-rar');
-INSERT INTO mime_type (mime_type) VALUES('application/x-bittorrent');
-INSERT INTO mime_type (mime_type) VALUES('application/prs.plucker');
-INSERT INTO mime_type (mime_type) VALUES('application/smil');
-INSERT INTO mime_type (mime_type) VALUES('application/x-abiword');
-INSERT INTO mime_type (mime_type) VALUES('application/x-blender');
-INSERT INTO mime_type (mime_type) VALUES('application/x-oleo');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-sunos-news');
-INSERT INTO mime_type (mime_type) VALUES('application/x-tex-gf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-netshow-channel');
-INSERT INTO mime_type (mime_type) VALUES('application/x-m4');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kexiproject-sqlite2');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kpovmodeler');
-INSERT INTO mime_type (mime_type) VALUES('application/illustrator');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-snf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gedcom');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kexiproject-shortcut');
-INSERT INTO mime_type (mime_type) VALUES('application/andrew-inset');
-INSERT INTO mime_type (mime_type) VALUES('application/x-bzdvi');
-INSERT INTO mime_type (mime_type) VALUES('application/x-siag');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ktheme');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kspread');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cbr');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cmakecache');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-framemaker');
-INSERT INTO mime_type (mime_type) VALUES('application/x-msx-rom');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-vfont');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-ttx');
-INSERT INTO mime_type (mime_type) VALUES('application/x-uml');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cdrdao-toc');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kpresenter');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kseg');
-INSERT INTO mime_type (mime_type) VALUES('application/x-dvi');
-INSERT INTO mime_type (mime_type) VALUES('application/x-java-applet');
-INSERT INTO mime_type (mime_type) VALUES('application/x-palm-database');
-INSERT INTO mime_type (mime_type) VALUES('application/pgp-encrypted');
-INSERT INTO mime_type (mime_type) VALUES('application/x-pocket-word');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kmplot');
-INSERT INTO mime_type (mime_type) VALUES('application/x-core');
-INSERT INTO mime_type (mime_type) VALUES('application/x-profile');
-INSERT INTO mime_type (mime_type) VALUES('application/x-mswinurl');
-INSERT INTO mime_type (mime_type) VALUES('application/x-lha');
-INSERT INTO mime_type (mime_type) VALUES('application/x-netcdf');
-INSERT INTO mime_type (mime_type) VALUES('application/msword');
-INSERT INTO mime_type (mime_type) VALUES('application/x-dar');
-INSERT INTO mime_type (mime_type) VALUES('application/pgp-signature');
-INSERT INTO mime_type (mime_type) VALUES('application/x-dmod');
-INSERT INTO mime_type (mime_type) VALUES('application/x-fictionbook+xml');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gettext-translation');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ace');
-INSERT INTO mime_type (mime_type) VALUES('application/x-macbinary');
-INSERT INTO mime_type (mime_type) VALUES('application/x-nintendo-ds-rom');
-INSERT INTO mime_type (mime_type) VALUES('application/x-troff-man-compressed');
-INSERT INTO mime_type (mime_type) VALUES('application/x-java');
-INSERT INTO mime_type (mime_type) VALUES('application/x-mimearchive');
-INSERT INTO mime_type (mime_type) VALUES('application/xml-dtd');
-INSERT INTO mime_type (mime_type) VALUES('application/x-smaf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-pw');
-INSERT INTO mime_type (mime_type) VALUES('application/x-lhz');
-INSERT INTO mime_type (mime_type) VALUES('application/x-dia-diagram');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kugar');
-INSERT INTO mime_type (mime_type) VALUES('application/x-sv4cpio');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kcachegrind');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gnumeric');
-INSERT INTO mime_type (mime_type) VALUES('application/x-fluid');
-INSERT INTO mime_type (mime_type) VALUES('application/x-quattropro');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gzip');
-INSERT INTO mime_type (mime_type) VALUES('application/x-shared-library-la');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gba-rom');
-INSERT INTO mime_type (mime_type) VALUES('application/x-sc');
-INSERT INTO mime_type (mime_type) VALUES('application/x-glade');
-INSERT INTO mime_type (mime_type) VALUES('application/x-catalog');
-INSERT INTO mime_type (mime_type) VALUES('application/x-php');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kexiproject-sqlite3');
-INSERT INTO mime_type (mime_type) VALUES('application/x-asp');
-INSERT INTO mime_type (mime_type) VALUES('application/x-sqlite2');
-INSERT INTO mime_type (mime_type) VALUES('application/x-tzo');
-INSERT INTO mime_type (mime_type) VALUES('application/x-wais-source');
-INSERT INTO mime_type (mime_type) VALUES('application/x-jbuilder-project');
-INSERT INTO mime_type (mime_type) VALUES('application/x-package-list');
-INSERT INTO mime_type (mime_type) VALUES('application/annodex');
-INSERT INTO mime_type (mime_type) VALUES('application/x-toutdoux');
-INSERT INTO mime_type (mime_type) VALUES('application/x-stuffit');
-INSERT INTO mime_type (mime_type) VALUES('application/pkcs10');
-INSERT INTO mime_type (mime_type) VALUES('application/x-sv4crc');
-INSERT INTO mime_type (mime_type) VALUES('application/x-java-keystore');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kommander');
-INSERT INTO mime_type (mime_type) VALUES('application/x-sami');
-INSERT INTO mime_type (mime_type) VALUES('application/xspf+xml');
-INSERT INTO mime_type (mime_type) VALUES('application/x-killustrator');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kgetlist');
-INSERT INTO mime_type (mime_type) VALUES('application/x-hdf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-mobipocket-ebook');
-INSERT INTO mime_type (mime_type) VALUES('application/x-shellscript');
-INSERT INTO mime_type (mime_type) VALUES('application/xhtml+xml');
-INSERT INTO mime_type (mime_type) VALUES('application/x-compressed-tar');
-INSERT INTO mime_type (mime_type) VALUES('application/x-nzb');
-INSERT INTO mime_type (mime_type) VALUES('application/x-markaby');
-INSERT INTO mime_type (mime_type) VALUES('application/x-sms-rom');
-INSERT INTO mime_type (mime_type) VALUES('application/rtf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-tuberling');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kgeo');
-INSERT INTO mime_type (mime_type) VALUES('application/x-n64-rom');
-INSERT INTO mime_type (mime_type) VALUES('application/x-smb-server');
-INSERT INTO mime_type (mime_type) VALUES('application/pkix-crl');
-INSERT INTO mime_type (mime_type) VALUES('application/x-dbf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-webarchive');
-INSERT INTO mime_type (mime_type) VALUES('application/x-smb-workgroup');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gnome-theme-package');
-INSERT INTO mime_type (mime_type) VALUES('application/epub+zip');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kchart');
-INSERT INTO mime_type (mime_type) VALUES('application/x-aportisdoc');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cisco-vpn-settings');
-INSERT INTO mime_type (mime_type) VALUES('application/x-egon');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kword');
-INSERT INTO mime_type (mime_type) VALUES('application/x-xbel');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-type1');
-INSERT INTO mime_type (mime_type) VALUES('application/x-lzip');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gdbm');
-INSERT INTO mime_type (mime_type) VALUES('application/x-executable');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-linux-psf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-tex-tfm');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-afm');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kcsrc');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kontour');
-INSERT INTO mime_type (mime_type) VALUES('application/x-msi');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cd-image');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-libgrx');
-INSERT INTO mime_type (mime_type) VALUES('application/x-designer');
-INSERT INTO mime_type (mime_type) VALUES('application/x-nautilus-link');
-INSERT INTO mime_type (mime_type) VALUES('application/x-zerosize');
-INSERT INTO mime_type (mime_type) VALUES('application/x-superkaramba');
-INSERT INTO mime_type (mime_type) VALUES('application/x-quanta');
-INSERT INTO mime_type (mime_type) VALUES('application/ram');
-INSERT INTO mime_type (mime_type) VALUES('application/javascript');
-INSERT INTO mime_type (mime_type) VALUES('application/rdf+xml');
-INSERT INTO mime_type (mime_type) VALUES('application/x-spss-por');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gnuplot');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kformula');
-INSERT INTO mime_type (mime_type) VALUES('application/x-mif');
-INSERT INTO mime_type (mime_type) VALUES('application/x-amipro');
-INSERT INTO mime_type (mime_type) VALUES('application/x-slp');
-INSERT INTO mime_type (mime_type) VALUES('application/x-audacity-project');
-INSERT INTO mime_type (mime_type) VALUES('application/x-archive');
-INSERT INTO mime_type (mime_type) VALUES('application/x-windows-themepack');
-INSERT INTO mime_type (mime_type) VALUES('application/x-t602');
-INSERT INTO mime_type (mime_type) VALUES('application/x-mswrite');
-INSERT INTO mime_type (mime_type) VALUES('application/dicom');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gzdvi');
-INSERT INTO mime_type (mime_type) VALUES('application/x-chm');
-INSERT INTO mime_type (mime_type) VALUES('application/x-lzma-compressed-tar');
-INSERT INTO mime_type (mime_type) VALUES('application/x-7z-compressed');
-INSERT INTO mime_type (mime_type) VALUES('application/postscript');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gtktalog');
-INSERT INTO mime_type (mime_type) VALUES('application/x-alz');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ustar');
-INSERT INTO mime_type (mime_type) VALUES('application/x-troff-man');
-INSERT INTO mime_type (mime_type) VALUES('application/xml');
-INSERT INTO mime_type (mime_type) VALUES('application/sieve');
-INSERT INTO mime_type (mime_type) VALUES('application/x-konsole');
-INSERT INTO mime_type (mime_type) VALUES('application/x-dc-rom');
-INSERT INTO mime_type (mime_type) VALUES('application/xsd');
-INSERT INTO mime_type (mime_type) VALUES('application/pkcs7-mime');
-INSERT INTO mime_type (mime_type) VALUES('application/x-xz');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cda');
-INSERT INTO mime_type (mime_type) VALUES('application/x-abicollab');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cpio');
-INSERT INTO mime_type (mime_type) VALUES('application/x-tgif');
-INSERT INTO mime_type (mime_type) VALUES('application/x-class-file');
-INSERT INTO mime_type (mime_type) VALUES('application/x-desktop');
-INSERT INTO mime_type (mime_type) VALUES('application/x-reject');
-INSERT INTO mime_type (mime_type) VALUES('application/x-xz-compressed-tar');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kivio');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kopete-emoticons');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kexi-connectiondata');
-INSERT INTO mime_type (mime_type) VALUES('application/x-compress');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gmc-link');
-INSERT INTO mime_type (mime_type) VALUES('application/x-krita');
-INSERT INTO mime_type (mime_type) VALUES('application/x-java-archive');
-INSERT INTO mime_type (mime_type) VALUES('application/x-theme');
-INSERT INTO mime_type (mime_type) VALUES('application/x-deb');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gnucash');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cabri');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-otf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kexiproject-sqlite');
-INSERT INTO mime_type (mime_type) VALUES('application/x-lzma');
-INSERT INTO mime_type (mime_type) VALUES('application/rss+xml');
-INSERT INTO mime_type (mime_type) VALUES('application/x-khtml-adaptor');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gzpostscript');
-INSERT INTO mime_type (mime_type) VALUES('application/x-bzip');
-INSERT INTO mime_type (mime_type) VALUES('application/mathml+xml');
-INSERT INTO mime_type (mime_type) VALUES('application/x-chess-pgn');
-INSERT INTO mime_type (mime_type) VALUES('application/x-remote-connection');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gameboy-rom');
-INSERT INTO mime_type (mime_type) VALUES('application/pkix-pkipath');
-INSERT INTO mime_type (mime_type) VALUES('application/x-shorten');
-INSERT INTO mime_type (mime_type) VALUES('application/x-snes-rom');
-INSERT INTO mime_type (mime_type) VALUES('application/x-quicktime-media-link');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ruby');
-INSERT INTO mime_type (mime_type) VALUES('application/x-tarz');
-INSERT INTO mime_type (mime_type) VALUES('application/ogg');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ole-storage');
-INSERT INTO mime_type (mime_type) VALUES('application/x-shar');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ksysv-package');
-INSERT INTO mime_type (mime_type) VALUES('application/x-x509-ca-cert');
-INSERT INTO mime_type (mime_type) VALUES('application/x-par2');
-INSERT INTO mime_type (mime_type) VALUES('application/x-linguist');
-INSERT INTO mime_type (mime_type) VALUES('application/x-trig');
-INSERT INTO mime_type (mime_type) VALUES('application/mac-binhex40');
-INSERT INTO mime_type (mime_type) VALUES('application/x-qw');
-INSERT INTO mime_type (mime_type) VALUES('application/xml-external-parsed-entity');
-INSERT INTO mime_type (mime_type) VALUES('application/octet-stream');
-INSERT INTO mime_type (mime_type) VALUES('application/x-matroska');
-INSERT INTO mime_type (mime_type) VALUES('application/x-applix-spreadsheet');
-INSERT INTO mime_type (mime_type) VALUES('application/x-plasma');
-INSERT INTO mime_type (mime_type) VALUES('application/x-e-theme');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cbz');
-INSERT INTO mime_type (mime_type) VALUES('application/x-java-jnlp-file');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kns');
-INSERT INTO mime_type (mime_type) VALUES('application/x-win-lnk');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ufraw');
-INSERT INTO mime_type (mime_type) VALUES('application/x-drgeo');
-INSERT INTO mime_type (mime_type) VALUES('application/x-perl');
-INSERT INTO mime_type (mime_type) VALUES('application/pkcs7-signature');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ms-dos-executable');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-tex');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kolf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-planperfect');
-INSERT INTO mime_type (mime_type) VALUES('application/x-go-sgf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kwallet');
-INSERT INTO mime_type (mime_type) VALUES('application/x-rpm');
-INSERT INTO mime_type (mime_type) VALUES('application/sdp');
-INSERT INTO mime_type (mime_type) VALUES('application/x-java-pack200');
-INSERT INTO mime_type (mime_type) VALUES('application/relaxng');
-INSERT INTO mime_type (mime_type) VALUES('application/x-servicepack');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-bdf');
-INSERT INTO mime_type (mime_type) VALUES('application/pkix-cert');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ipod-firmware');
-INSERT INTO mime_type (mime_type) VALUES('application/x-object');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ica');
-INSERT INTO mime_type (mime_type) VALUES('application/x-it87');
-INSERT INTO mime_type (mime_type) VALUES('application/x-zoo');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gzpdf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-magicpoint');
-INSERT INTO mime_type (mime_type) VALUES('application/docbook+xml');
-INSERT INTO mime_type (mime_type) VALUES('application/x-csh');
-INSERT INTO mime_type (mime_type) VALUES('application/x-nes-rom');
-INSERT INTO mime_type (mime_type) VALUES('application/x-graphite');
-INSERT INTO mime_type (mime_type) VALUES('application/x-spss-sav');
-INSERT INTO mime_type (mime_type) VALUES('application/x-tar');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kvtml');
-INSERT INTO mime_type (mime_type) VALUES('application/metalink+xml');
-INSERT INTO mime_type (mime_type) VALUES('application/ecmascript');
-INSERT INTO mime_type (mime_type) VALUES('application/x-hwt');
-INSERT INTO mime_type (mime_type) VALUES('application/x-pak');
-INSERT INTO mime_type (mime_type) VALUES('application/x-sqlite3');
-INSERT INTO mime_type (mime_type) VALUES('application/x-trash');
-INSERT INTO mime_type (mime_type) VALUES('application/x-arj');
-INSERT INTO mime_type (mime_type) VALUES('application/x-k3b');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-pcf');
-INSERT INTO mime_type (mime_type) VALUES('application/oda');
-INSERT INTO mime_type (mime_type) VALUES('application/x-genesis-rom');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-ttf');
-INSERT INTO mime_type (mime_type) VALUES('application/zip');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cbt');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kspread-crypt');
-INSERT INTO mime_type (mime_type) VALUES('application/x-pef-executable');
-INSERT INTO mime_type (mime_type) VALUES('application/x-brasero');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cb7');
-INSERT INTO mime_type (mime_type) VALUES('application/x-frame');
-INSERT INTO mime_type (mime_type) VALUES('application/x-lyx');
-INSERT INTO mime_type (mime_type) VALUES('application/x-lzop');
-INSERT INTO mime_type (mime_type) VALUES('application/x-planner');
-INSERT INTO mime_type (mime_type) VALUES('application/x-vnc');
-INSERT INTO mime_type (mime_type) VALUES('application/atom+xml');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gz-font-linux-psf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-xliff');
-INSERT INTO mime_type (mime_type) VALUES('application/mathematica');
-INSERT INTO mime_type (mime_type) VALUES('application/xslt+xml');
-INSERT INTO mime_type (mime_type) VALUES('application/x-sharedlib');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kwordquiz');
-INSERT INTO mime_type (mime_type) VALUES('application/x-bzpostscript');
-INSERT INTO mime_type (mime_type) VALUES('application/x-pkcs12');
-INSERT INTO mime_type (mime_type) VALUES('application/x-mozilla-bookmarks');
-INSERT INTO mime_type (mime_type) VALUES('application/x-awk');
-INSERT INTO mime_type (mime_type) VALUES('application/x-navi-animation');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cpio-compressed');
-INSERT INTO mime_type (mime_type) VALUES('application/x-arc');
-INSERT INTO mime_type (mime_type) VALUES('application/x-icq');
-INSERT INTO mime_type (mime_type) VALUES('application/x-bzpdf');
-INSERT INTO mime_type (mime_type) VALUES('application/mbox');
-INSERT INTO mime_type (mime_type) VALUES('application/x-ksysguard');
-INSERT INTO mime_type (mime_type) VALUES('application/x-java-jce-keystore');
-INSERT INTO mime_type (mime_type) VALUES('application/x-subrip');
-INSERT INTO mime_type (mime_type) VALUES('application/x-karbon');
-INSERT INTO mime_type (mime_type) VALUES('application/x-python-bytecode');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-dos');
-INSERT INTO mime_type (mime_type) VALUES('application/pgp-keys');
-INSERT INTO mime_type (mime_type) VALUES('application/x-font-speedo');
-INSERT INTO mime_type (mime_type) VALUES('application/pdf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-cue');
-INSERT INTO mime_type (mime_type) VALUES('application/x-gnome-saved-search');
-INSERT INTO mime_type (mime_type) VALUES('application/x-bcpio');
-INSERT INTO mime_type (mime_type) VALUES('application/x-applix-word');
-INSERT INTO mime_type (mime_type) VALUES('application/mxf');
-INSERT INTO mime_type (mime_type) VALUES('application/x-wpg');
-INSERT INTO mime_type (mime_type) VALUES('application/x-bzip-compressed-tar');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kword-crypt');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kig');
-INSERT INTO mime_type (mime_type) VALUES('application/gnunet-directory');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kourse');
-INSERT INTO mime_type (mime_type) VALUES('application/x-kudesigner');
-INSERT INTO mime_type (mime_type) VALUES('application/x-tex-pk');
-INSERT INTO mime_type (mime_type) VALUES('video/x-ms-asf');
-INSERT INTO mime_type (mime_type) VALUES('video/mp4');
-INSERT INTO mime_type (mime_type) VALUES('video/mpeg');
-INSERT INTO mime_type (mime_type) VALUES('video/annodex');
-INSERT INTO mime_type (mime_type) VALUES('video/x-sgi-movie');
-INSERT INTO mime_type (mime_type) VALUES('video/isivideo');
-INSERT INTO mime_type (mime_type) VALUES('video/x-ogm+ogg');
-INSERT INTO mime_type (mime_type) VALUES('video/x-mng');
-INSERT INTO mime_type (mime_type) VALUES('video/x-flv');
-INSERT INTO mime_type (mime_type) VALUES('video/x-flic');
-INSERT INTO mime_type (mime_type) VALUES('video/x-theora+ogg');
-INSERT INTO mime_type (mime_type) VALUES('video/3gpp');
-INSERT INTO mime_type (mime_type) VALUES('video/x-ms-wmv');
-INSERT INTO mime_type (mime_type) VALUES('video/ogg');
-INSERT INTO mime_type (mime_type) VALUES('video/dv');
-INSERT INTO mime_type (mime_type) VALUES('video/x-matroska');
-INSERT INTO mime_type (mime_type) VALUES('video/vivo');
-INSERT INTO mime_type (mime_type) VALUES('video/quicktime');
-INSERT INTO mime_type (mime_type) VALUES('video/x-ms-wmp');
-INSERT INTO mime_type (mime_type) VALUES('video/x-msvideo');
-INSERT INTO mime_type (mime_type) VALUES('video/x-anim');
-INSERT INTO mime_type (mime_type) VALUES('video/wavelet');
-INSERT INTO mime_type (mime_type) VALUES('video/x-nsv');
-INSERT INTO mime_type (mime_type) VALUES('interface/x-winamp-skin');
-INSERT INTO mime_type (mime_type) VALUES('multipart/encrypted');
-INSERT INTO mime_type (mime_type) VALUES('multipart/x-mixed-replace');
-INSERT INTO mime_type (mime_type) VALUES('multipart/related');
-INSERT INTO mime_type (mime_type) VALUES('multipart/report');
-INSERT INTO mime_type (mime_type) VALUES('multipart/signed');
-INSERT INTO mime_type (mime_type) VALUES('multipart/appledouble');
-INSERT INTO mime_type (mime_type) VALUES('multipart/mixed');
-INSERT INTO mime_type (mime_type) VALUES('multipart/alternative');
-INSERT INTO mime_type (mime_type) VALUES('multipart/digest');
Deleted: trunk/sql/upgrade/3594-drop-batch-update.sql
===================================================================
--- trunk/sql/upgrade/3594-drop-batch-update.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3594-drop-batch-update.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,2 +0,0 @@
-DROP FUNCTION batch_update (in_batch text, in_login varchar, in_entered date,
- in_batch_number text, in_description text, in_id integer);
Deleted: trunk/sql/upgrade/3613-drop-file_type.sql
===================================================================
--- trunk/sql/upgrade/3613-drop-file_type.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3613-drop-file_type.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1 +0,0 @@
-DROP TYPE file_list_item CASCADE;
Deleted: trunk/sql/upgrade/3626-more-mime-types.sql
===================================================================
--- trunk/sql/upgrade/3626-more-mime-types.sql 2011-09-16 22:53:23 UTC (rev 3703)
+++ trunk/sql/upgrade/3626-more-mime-types.sql 2011-09-16 22:57:47 UTC (rev 3704)
@@ -1,85 +0,0 @@
-INSERT INTO mime_type (mime_type) VALUES('audio/vnd.rn-realaudio');
-INSERT INTO mime_type (mime_type) VALUES('image/vnd.dwg');
-INSERT INTO mime_type (mime_type) VALUES('image/vnd.djvu');
-INSERT INTO mime_type (mime_type) VALUES('image/vnd.rn-realpix');
-INSERT INTO mime_type (mime_type) VALUES('image/vnd.dxf');
-INSERT INTO mime_type (mime_type) VALUES('image/vnd.wap.wbmp');
-INSERT INTO mime_type (mime_type) VALUES('image/vnd.ms-modi');
-INSERT INTO mime_type (mime_type) VALUES('image/vnd.microsoft.icon');
-INSERT INTO mime_type (mime_type) VALUES('image/vnd.adobe.photoshop');
-INSERT INTO mime_type (mime_type) VALUES('text/vnd.wap.wml');
-INSERT INTO mime_type (mime_type) VALUES('text/vnd.wap.wmlscript');
-INSERT INTO mime_type (mime_type) VALUES('text/vnd.sun.j2me.app-descriptor');
-INSERT INTO mime_type (mime_type) VALUES('text/vnd.abc');
-INSERT INTO mime_type (mime_type) VALUES('text/vnd.rn-realtext');
-INSERT INTO mime_type (mime_type) VALUES('text/vnd.graphviz');
-INSERT INTO mime_type (mime_type) VALUES('application/vnd.mozilla.xul+xml');
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.