Bug 11155 - PostgreSQL schema contains syntax errors
Summary: PostgreSQL schema contains syntax errors
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 7365
  Show dependency treegraph
 
Reported: 2013-10-29 03:54 UTC by Dan Scott
Modified: 2015-06-04 23:23 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Fixes syntax errors in PostgreSQL db schema (45.05 KB, text/x-sql)
2013-10-29 03:54 UTC, Dan Scott
Details
Bug 11155: remove old PostgreSQL schema and MARC framework scripts (4.98 MB, patch)
2013-12-13 01:40 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 11155: remove old PostgreSQL schema and MARC framework scripts (4.98 MB, patch)
2013-12-22 22:15 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 11155: remove old PostgreSQL schema and MARC framework scripts (4.98 MB, patch)
2013-12-23 10:29 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Scott 2013-10-29 03:54:27 UTC
Created attachment 22507 [details]
Fixes syntax errors in PostgreSQL db schema

installer/data/Pg/kohastructure.sql contains two syntax errors:

* "mediumtext" is not a valid data type for PostgreSQL
* "branch_transfer_limits_pkey" defines the primary key twice, which causes an error for PostgreSQL
Comment 1 Katrin Fischer 2013-10-29 17:51:17 UTC
Hi Dan, 
I am marking this WONTFIX, because we currently do not maintain the PostgresSQL db schema and it's outdated. To my knowledge Koha can currently not be used with PostgresSQL, but it might be possible sometime in the future, as we have started using DBIX::Class.
Comment 2 Dan Scott 2013-10-29 17:57:09 UTC
Okay. Would you entertain a patch that removes the PostgreSQL cruft, then, so that people like me don't waste our time in the future?
Comment 3 Galen Charlton 2013-10-29 18:52:46 UTC
(In reply to Dan Scott from comment #2)
> Okay. Would you entertain a patch that removes the PostgreSQL cruft, then,
> so that people like me don't waste our time in the future?

Yes, we will.  Note that the general idea is that in the next release, the schema will be initialized from the DBIC schema classes, not big SQL scripts as is the status quo.
Comment 4 Galen Charlton 2013-12-13 01:40:18 UTC Comment hidden (obsolete)
Comment 5 Chris Cormack 2013-12-22 22:15:21 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2013-12-23 10:29:33 UTC
Created attachment 23778 [details] [review]
Bug 11155: remove old PostgreSQL schema and MARC framework scripts

This patch removes the legacy Pg schema and MARC framework scripts
as they're out of date.  They will be replaced by use of DBIx::Class
to deploy the schema.  Loading the sample data and settings will be
accomplished either by making the current scripts in installer/data/mysql
DBMS-independent (or, at least, able to be processed by both MySQL and Pg),
converting them to flat text files and writing code to load them, or a
combination of the two approaches.

To test:

[1] Verify that installer/data/Pg is removed.  There is some code
    in C4::Installer that refers to that directory, but it cannot
    be reached through normal means.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 7 Galen Charlton 2013-12-23 16:13:45 UTC
Pushed to master.
Comment 8 Fridolin Somers 2013-12-30 10:30:48 UTC
Patch pushed to 3.14.x, will be in 3.14.2.