-
Notifications
You must be signed in to change notification settings - Fork 289
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
Add PostgreSQL backend #1194
base: master
Are you sure you want to change the base?
Add PostgreSQL backend #1194
Conversation
ref #122 |
since one ! does this PR would make it into new release ? |
Looking forward to Postgresql support!! I keep MySQL on the server just for the sake of Baikal. |
I use Baikal with this patch for my personal use during half year from clean install and don't have any troubles. The following features were tested: Baikal setup procedure / UI (with Postgres) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just had a go at setting this up locally (I have a lot of calendars so SQLite is probably not a great choice, and I'm not interested in setting up MySQL just for this when I already have other software talking to PostgreSQL) and it seems to work, but with a couple of snags during the initial setup.
Baikal/Core/Frameworks/Baikal/Core/Tools.php
Lines 46 to 50 in 3ca9b4f
# Asserting PDO::SQLite or PDO::MySQL | |
$aPDODrivers = \PDO::getAvailableDrivers(); | |
if (!in_array('sqlite', $aPDODrivers, true) && !in_array('mysql', $aPDODrivers, true)) { | |
exit('<strong>Baikal Fatal Error</strong>: Both <strong>PDO::sqlite</strong> and <strong>PDO::mysql</strong> are unavailable. One of them at least is required by Baikal.'); | |
} |
This check needs updating to also include PDO::pgsql
as a valid option.
a43af02
to
be51975
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more hiccup with the settings page (/admin/?/settings/database/
):
if ($bMySQL === true) { |
if (intval($oForm->modelInstance()->get("mysql")) === 1) { |
These will need similar updates to the installation's database page to check for PostgreSQL too (currently the page falls through to SQLite).
bed2fc8
to
54ebfe0
Compare
Great to see this, any idea what would be needed to get this merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not seen any other issues. 👍
Combined with CloudNative-PG this finally gives an easy route to enterprise-grade hosted baikal, nice! |
Looking forward to this being merged that would finally fix #122 |
53175ea
to
b322aaa
Compare
Co-authored-by: Kim Lidström <dxtr@users.noreply.github.com>
Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php
Outdated
Show resolved
Hide resolved
Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php
Outdated
Show resolved
Hide resolved
Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php
Outdated
Show resolved
Hide resolved
I've just installed Baikal with this patch to my server. Looks like everything works well with PostgreSQL. I hope this patch will be accepted so I can use the official build. |
Hi there! Any news? kind ping to @ByteHamster |
This PR adds experimental PostgreSQL support.
Based upon the work of @dxtr, extended and adapted to the latest version of Baikal.
✅ The following features were tested: