CUAHSI / CUAHSI/HydroServerLite
postgresql support
- Dominant language
- PHP
- Stars
- 7
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Hey, I'm trying to setup the hydroserver with an existing postgres database. This database has an odm likely schema, and is already with a specific web front and server backend in use. Using postgres was an design decision, but still the connection to cuahsi his network should be established. For this reason I migrated the postgres db schema with sql views to the odm schema. After that, I had two attempts to get the hydroserver running. This led to two types of errors:
### Problem 1 - setup
After I replaced the necessary values of keywords in the configuration files, I tried to "install" the server throughout the browser gui. This doesn't seemed to work, since the files in `./setup/*.php` calling database interfaces of mysql with `mysqli`-php methods and not using the mvc-pattern database driver code, written with codeigniter.
So I tried to just run the server without an installation, just using the php code with my migrated schema.
### Problem 2 - sql queries / codeiginiter escaping
I had different kinds of problems with sql identifiers, when trying to use the interface test methods of the browser interface:
- A statement like this `... "siteid" FROM "sites"`can occur and statments like this `... "'siteid'" ...`. I could easily fix it (just adding several un-/escaped versions of `siteid` to my sql views), but maybe its caused by the same reason as the next problem
- A statement like this `... FROM sites WHERE siteid IN ("41", ...`, where the list after `IN` should hold integers like `... (41, ...)` and not a string. This led to an error/abort of execution.
I'm pretty sure that codeigniter is escaping the uncommon statement chars like `'`, `\` and `"` and leads to an error when escaping, where it shouldn't.
If someone has some thoughts on this, please let me know. I will keep this post up to date and/or maybe open a pull request on this issue.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the files under ./setup/*.php alongside the CodeIgniter database-driver path, then reproduce the browser interface test methods against the migrated PostgreSQL/ODM schema. Done means the setup flow and the reported identifier and IN-query cases work without the described failures, with verification for both paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgresql
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100