-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 compatibility #137
Comments
The NOT NULL constraints issue applies to SQLite, too. |
The first item of this issue is fixed and in production. |
I confirm having the same problem with NOT NULL constraints on SQLite |
Thanks for fixing the first point. Do we know why we are having inconsistency with nullable columns between MySql and Postgresql/SQLite? |
I received Postgres errors when setting up, aswell:
|
@djaiss the second one isn't yet this issue is closed. Please reopen it. I just ran into it as well. |
Migrations with postgres was fixed with #785. |
While following the Installing-Monica-on-Debian guide, but replacing mysql with postgresql, the installation fails at step 7.7 running: The error messages while running this command are:
Versions: Would it be possible to fix these, so that monica works with postgresql please? Many thanks, |
@asbiin This issue ('Postgresql compatibility' in general) is not fixed yet. While the initial setup/launch worked after #1309, actually using the software made more errors surface, errors serious enough to make it unusable. (I do not have access to these errors right now, but intend to post more info once I have) I suggest to reopen this issue, and specifically have a look at #781 that brings up an interesting suggestion to increase postgres compatibility by setting MySQL to a more strict mode that is more similar to how postgres works. Edit: An alternative would be to leave this issue closed as it seems to be about specific issues by now solved, but open a (new) issue for general compatibility with PostgreSQL. |
This issue has been automatically locked since there |
I'm running a monica instance on postgres and I run into a few issues during my set-up:
https://github.com/monicahq/monica/blob/c199c5e4f017404a18b3c9733d8f97ff2fb3e5cb/database/migrations/2017_05_04_193252_alter_activity_nullable.php uses the MODIFY keyword. This is valid for MySql and Oracle, but not Postgresql.
I had to use
DB::statement('ALTER TABLE "activities" ALTER COLUMN "activity_type_id" TYPE INTEGER;');
I'm not familliar with Laravel migration, so I'm not sure how to make the code pick the right SQL statement based on the configured database.
A few columns in the users and contacts were created with NOT NULL constraints and monica violated those constraints when creating a new users or inserting a new contact.
users: gender, facebook_user_id
contacts: number_of_tasks_in_progress, number_of_tasks_completed, default_avatar_color
I'm not sure if this was due to a bug on the version of monica I've checked out or an imcompatibility with postgresql.
The text was updated successfully, but these errors were encountered: