Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgresql initialization not working properly with DB-Prefix #4539

Closed
rcubetrac opened this issue Apr 28, 2014 · 2 comments
Closed

postgresql initialization not working properly with DB-Prefix #4539

rcubetrac opened this issue Apr 28, 2014 · 2 comments

Comments

@rcubetrac
Copy link

Reported by imlich on 28 Apr 2014 11:05 UTC as Trac ticket #1489839

in the past I have separated data from different roundcube versions by using different schemas in postgresql and tweaking the code such that the search_path is set accordingly.

Now upgrading to 1.0.0 I thought to give the installer a try and using a DB-Prefix instead of separate schema.

fix_table_names in rcmail_installer.php is not working properly:

A) INDEXES are not handled. So adding a similar code as for CREATE SEQUENCE will help.

B) CONSTRAINTS/INDEXES are not handled properly if they have an explicit name, as the DB-Prefix would need to be added, e.g. in table "users", it should read:
CONSTRAINT DBPREFIXusers_username_key UNIQUE (username, mail_host) as you get otherwise naming conflicts. The easiest to avoid this is NOT to use explicit names for constraints and indexes. Postgresql will then create unique names (which will be according to {tablename}{columnname(s)}{suffix} ).

Keywords: postgresql,initialization,schema,prefix
Migrated-From: http://trac.roundcube.net/ticket/1489839

@rcubetrac
Copy link
Author

Comment by @alecpl on 29 Apr 2014 09:59 UTC

Fixed in 90f7aa9

@rcubetrac
Copy link
Author

Status changed by @alecpl on 29 Apr 2014 09:59 UTC

new => closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant