You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A couple/few years ago I forked YOURLS and converted it to postgress (but in right inline breaking mysql functionality). I was too green in php then to think it was good code (still am :p) and that I could merge it. I just pulled in an updated YOURLS codebase and applied my changes in a modular fashion. If you want, I can file a PR; look it over here:
I pulled as much database specific code as I found into "includes/class-<mysql|pgsql>.php". I removed the mysql specific backtick syntax everywhere I could (mysql will work w/o it and psql won't work with it). I hacked "docker-entrypoint.sh" over on the docker project:
I know we've been talking about keeping stuff out of the config file, but a new constant is kind of the only reasonable way to select the database type. I propose YOURLS_DB_TYPE.
"YOURLS_DB_TYPE" would make sense. The entry point script triggers off "mysql" and "pgsql" as the docker database network names; which wouldn't work for non-docker setups of course.
@ozh, if you grant write permissions to YOURLS and docker-yourls; I can commit a "postgress" branch to your projects for testing/integrating.
This code is tested for clicks, adds, edits, etc... I am sure there are a lot of places that need additional help like the apis; but this is a start maybe.
FYI, I will be out for a few weeks starting this weekend so I may not get to commit first. But the code is here in my repo.
A couple/few years ago I forked YOURLS and converted it to postgress (but in right inline breaking mysql functionality). I was too green in php then to think it was good code (still am :p) and that I could merge it. I just pulled in an updated YOURLS codebase and applied my changes in a modular fashion. If you want, I can file a PR; look it over here:
I pulled as much database specific code as I found into "includes/class-<mysql|pgsql>.php". I removed the mysql specific backtick syntax everywhere I could (mysql will work w/o it and psql won't work with it). I hacked "docker-entrypoint.sh" over on the docker project:
to install pgsql and create the database if pgsql is selected (see "stack.yml" and "stack-pgsql.yml" and "start.bash").
There needs to be a good database selector mechanism, for now I run:
and that selects postgress.
Let me know what you think.
The text was updated successfully, but these errors were encountered: