Merge pull request #187 in ZP/z-push from feature/ZP-230-sql-state-provider to develop
* commit 'd2cd0a1b': ZP-230 Remove obsolete include. ZP-230 Fixed @throws of GetState() and CleanStates() so it's the same as in the interface. ZP-230 Replaced RuntimeException with UnavailableException (newly introduced), changed IStateMachine so GetState() and SetState() can throw this exception, adjusted interface documentation in filestatemachine. ZP-230 Removed zpush_ prefixes of the table names and table crate constants, throw FatalExceptions on DB errors, option for getDbh() to rethrow the PDO exception (when checking for tables), removed created_at and updated_at fields from the users table, removed other methods not part of the interface (GetUserDevicePermission, GetMappedUsername, MapUsername and UnmapUsername - code will be attached to the ticket), renamed and fixed CheckTablesHaveData so it indicates if there is data in any table, included sql stuff to composer autoload, tweaked the output of the migration script, don't log GetStateHash() as it logs a lot. ZP-230 Deleted unnecessary mysql folder and mysql.sql file. ZP-230 Fix hierarchy folder data before starting the migration. Fixed typo in output. ZP-230 Removed log statement. ZP-230 Cache prepared SQL statement for GetStateHash calls. ZP-230 Create a PDO instance once and reuse it in later calls. ZP-230 Made dsn instance variable instead of a local variable in every function. ZP-230 Capitalised SQL key words in statements. ZP-230 Capitalised SQL key words in statements. Reviewed log statements. Removed unnecessary sprintf calls. Fixed typos. ZP-230 Fixed update statement in SetState. Null values weren't handled properly. ZP-230 Script to migrate file states to database states. Changes to sqlstatemachine.php to work better with the migration script. ZP-230 Changed config to use separate parameters for the engine, server, port and database. Changed the code to match that. Added checks for the database and table creation if they not exist. Fixed comments. ZP-230 Use __construct instead of PHP 4 style constructor for PHP 7 compatibility. ZP-230 move sqlstatemachine.php to backend/sqlstatemachine folder, move SQL configuration into config.php of sqlstatemachine, update references and copyright year. ZP-230 Create SQL state provider. Released under the Affero GNU General Public License (AGPL) version 3.
Showing
This diff is collapsed.
Please register or sign in to comment