InvoicePlane icon indicating copy to clipboard operation
InvoicePlane copied to clipboard

[IP-729] Postgres support for IPv1.6.0

Open steve-ks opened this issue 7 years ago • 3 comments

Pull Request Checklist

  • [x] My code follows the code formatting guidelines.
  • [x] I have an issue ID for this pull request.
  • [x] I selected the corresponding branch.
  • [x] I have rebased my changes on top of the corresponding branch.

Issue Type (Please check one or more)

  • [ ] Bugfix
  • [x] Improvement of an existing Feature
  • [x] New Feature

NOTE: This is an update for #652

Adding postgres support beside mysql in InvoicePlane 1.

Main file added is the application/helpers/sql_helper.php file, which adapts dirver-specific SQL calls and functionality. All SQL queries, query-builds and other database interactions have been modified to either more general SQL or driver-specific handling using the sql-helper.

In general most functionality has been tested using both mysql and postgres. More detailed tests are required. Installing a new IP using either mysql or postgres works fluently. Creating, modifying, deleting clients, quotes, (recurring) invoices, projects, tasks, products and reports works as expected.

Code changes are mostly made to models (Mdl_*.php files), some slight changes within the MY_Model.php core file. Also all sql setup files have been moved into an own mysql subfolder, copying and adapting all sql files into another postgres subfolder.

Note that the environment file has been changed and needs the DB_DRIVER='mysqli' line as otherwise no driver is selected. The line has been added to the ipconfig.php.example file. During setup the database driver can now be selected within the database configuration. Default ports are correctly switched via simple JS onchange statements when switching the database driver.

Blessings, Steve

steve-ks avatar Aug 27 '18 09:08 steve-ks

I've added another commit for the session class, somehow I've overlooked the authenticate method which was redundant and made authentication impossible. The problem was caused by rebasing.

steve-ks avatar Aug 28 '18 06:08 steve-ks

@boostio funded this issue with $10. Visit this issue on Issuehunt

IssueHuntBot avatar Sep 15 '18 04:09 IssueHuntBot

Funding will be split 50:50 for development and testing. 50% go to @steve-ks
50% go to a user that tests the implementation.

Kovah avatar Sep 17 '18 08:09 Kovah