summaryrefslogtreecommitdiff
path: root/datadict
AgeCommit message (Collapse)AuthorFilesLines
2025-03-23Merge branch 'hotfix/5.22'Damien Regad12-14/+17
# Conflicts: # datadict/datadict-sqlite.inc.php
2025-03-23Fulfill SQLite PRIMARY KEY AUTOINCREMENT requirementsDamien Regad12-14/+17
- Extend _CreateSuffix() with two additional parameters. - Adjust _createSuffix function name. - Add PHPDoc block - Fix spaces Fixes #1055 Signed-off-by: Damien Regad <dregad@mantisbt.org> Changes from PR: - Original commits squashed - Removed space after `&` for byref params - Updated Changelog
2024-12-23Fix typosAndreas Deininger1-4/+4
2024-12-15Coding guidelinesDamien Regad1-34/+46
2024-12-15SQLite: enable DROP and RENAME COLUMNDamien Regad1-4/+14
- RENAME COLUMN is available since 3.25.0 [1] - DROP COLUMN available since 3.35.0 [2] Check SQLite version and only return an empty array with debug message if not supported. Fixes #1053 [1]: https://www.sqlite.org/releaselog/3_25_0.html [2]: https://www.sqlite.org/releaselog/3_35_0.html
2023-01-16Use IF NOT EXISTS when adding a new column Ioannis Igoumenos1-1/+2
Executing a schema update that adds a column more than once will generate a column already exists error. This prevents the error by appending `IF NOT EXISTS` to the generated SQL on PostgreSQL 9.6 or later. Fixes #897 Signed-off-by: Damien Regad <dregad@mantisbt.org> Reworded commit message
2022-01-16Fix reported errors in generated documentationDamien Regad1-8/+11
2021-10-25WhitespaceDamien Regad1-21/+21
2021-08-22Remove unused variablesDamien Regad1-2/+1
2021-08-22Fix Whitespace, coding guidelines, PHPDocDamien Regad1-113/+142
2021-08-22update sequence to use recommended syntaxMark Newnham1-6/+6
replace keyword GENERATOR with SEQUENCE in sequence manipulation methods
2021-08-22add basic support for column manipulation in the data dictionaryMark Newnham1-13/+25
2021-08-22Change actualType for metaType XLMark Newnham1-1/+1
metaType XL now returns BLOB sub type BINARY instead of sub type text.
2021-08-17Redo Merge branch 'hotfix/5.21' Standardized file headersDamien Regad14-154/+253
Try to do it right this time... # Conflicts: # adodb-memcache.lib.inc.php Fixes #751
2021-08-17Reset version to avoid merge conflictsDamien Regad14-14/+14
Fixes #751
2021-08-17Revert changes since Standardized file headers mergeDamien Regad14-265/+168
The conflicts resolution applied when merging the Standardized file headers (commit e9dcce3df24912ad869d0193f0b419f2309101fc) was seriously messed up, actually overwriting a number of changes in the master branch. Rather than trying to go and fix things one by one which has a high risk of messing things further, it's easier to redo the merge from a clean slate, so this commit reverts the following: - "Merge branch 'hotfix/5.21' Standardized file headers", e9dcce3df24912ad869d0193f0b419f2309101fc - "Merge tag 'v5.21.1'", 5f437df3104159d5d659f60e31bef8d33c34995f - "Reset version to 5.22.0-dev" af9234a525c3255af051a330164486d73be4c63a - "Fix incorrect resolution of merge conflicts" a6733f61b0165b366c8d2c70d9af82edc3881951. - "Fix syntax error in toexport.inc.php" 20b01e83cb61b6b2460f64c7d1277c5f4cc28574. Fixes #751
2021-08-16Fix incorrect resolution of merge conflictsDamien Regad14-21/+201
Partial revert of e9dcce3df24912ad869d0193f0b419f2309101fc.
2021-08-14Standard file header: /datadictDamien Regad14-154/+253
2021-03-27Improve code style for datadict-postgres.inc.phppeterdd1-97/+92
* proper function cases * remove space between function name and following '(' * fix some indentation where really wrong * add { and } to single instruction ifs to avoid future potential bugs * { on new line for functions * { on same line as if, foreach, or switch statements * add single space between function parameters after , Fixes #691
2021-03-11Remove comment block with SQL statements syntaxDamien Regad1-72/+0
No need to have this in the code, just lookup the documentation.
2021-03-11Fix PHPStorm static analysis warningsDamien Regad1-20/+24
- SQL syntax - unused variables - duplicated code - Whitespace - Variables and return types in PHPDoc
2021-03-11PHPDoc, camelCase for defaultConstraintName()Damien Regad1-5/+12
2021-03-11mssql: use getOne to get default constraintDamien Regad1-11/+4
Simplifies the code, and gets rid of PHP Warnings, both on line 164 in datadict-mssqlnative.inc.php: - Trying to access array offset on value of type bool - Undefined array key "name" Fixes #696
2021-03-08Bump version to 5.21.1-devDamien Regad14-14/+14
2021-02-27Bump version to 5.21.0v5.21.0Damien Regad14-14/+14
2021-02-02Bump version to 5.21.0-rc.1v5.21.0-rc.1Damien Regad14-14/+14
2021-01-24pgsql: add override for ChangeTableSQL()jmruiz841-0/+44
Inheritance from ADODB DataDict does not work. This new function has been verified in PostgreSQL 12.2 Fixes #634
2020-12-20Bump version to 5.21.0-beta.1v5.21.0-beta.1Damien Regad14-14/+14
2020-01-12Fix PHPDocDamien Regad1-13/+16
2020-01-12oci8: create compact trigger/sequence namesMark Newnham1-16/+43
This enhancement provides a method of creating an emulated auto- increment column for a table with a name greater than 25 characters, built using createTableSql() and specifying an "AUTO" option on the required column. Instead of using the table name, a CRC32 value of the tablename is created and used for the name of the sequence and trigger, i.e. instead of a trigger called "TRIG_EMPLOYEES" for a table called "EMPLOYEES", it creates a trigger "TRIG_3129131776", and similarly, a trigger for a table named "EMPLOYEE_HOURLY_PAY_RATES" becomes "TRIG_3754194288". The name of the trigger and sequence can be easily obtained after the fact by finding the CRC32 value of the table name. The feature is provided with a compatibility flag that must be enabled. Existing configurations that already use this feature are unchanged. To activate, set the dictionary class variable `$dict->useCompactAutoIncrements = true` when building the table, and the connection class variable `$db->useCompactAutoIncrements = true` when using the table in ADOdb. The feature is global for the database and cannot be specified on a table level basis. Fixes #565
2019-12-30mssqlnative: Added BLOB NOT NULL and DEFAULT supportMartin Schleußer1-0/+3
See #292, #478
2019-12-30db2: Added BLOB NOT NULL and DEFAULT support.Mark Newnham1-0/+4
See #292
2019-12-30Provides Control of BLOB data dictionary featureMark Newnham3-2/+8
ADOdb automatically disallows setting of NOT NULL or DEFAULT values on blob type fields. This was due to historic limitations on data types that no longer exists. This commit takes the work done in PR #118 by @obmsch and adds the driver for SQLite. Fixes #292
2019-12-30pgsql: specialized casts for _recreate_copy_table()Ralf Becker1-13/+27
Current PostgreSQL versions wont allow an ALTER COLUMN between varchar and bytea (blob) without an explicit cast. This pull request adds this casts for both directions and fixes sequence name detection to understand newer ::regclass instead of ::text in defaults. Fixes #207 Signed-off-by: Damien Regad <dregad@mantisbt.org> Original commits in PR #207 squashed and message reworded.
2019-11-12Codespell assisted typo cleaningJean-Michel Vourgère2-11/+11
2019-06-25Syntax error prevents correct sequence creation see #540Mark Newnham1-1/+1
The feature that duplicates auto-increment key fields does not work if the start number for the sequence is greater than 1
2018-07-29This release of the IBM DB2 driver is a full rewrite, based on the DB2Mark Newnham1-11/+65
native mode client, instead of the ODBC based one used previously. It encompasses the following changes: 1. All of the missing data dictionary functions have been added. 2. Proper binding of parameters to queries. 3. Support for stored procedures. 4. Full support for specific table casing, via a new method, setTableCase(). 5. Support for the setConnectionParameter() method, allowing use of elements such as CURSOR and trustedcontext 6. Connections via both catalogued and uncatalogued connections. 7. Support for sequences 8. The option $uCaseTables is no longer supported 9. The performance monitor is currently out of operation due to changes in the DB2 system tables The driver has been tested on PHP version 7.1, and is not supported on ADOdb versions less than 5.21
2017-05-13method ChangeTableSQL is incompatible with parent method, see #338Mark Newnham1-2/+1
2016-12-17Merge branch 'hotfix/5.20.8'Damien Regad1-9/+61
Conflicts: drivers/adodb-mssqlnative.inc.php
2016-12-17Reset version to avoid merge conflictsDamien Regad14-14/+14
2016-12-17Bump version to 5.20.8v5.20.8Damien Regad14-14/+14
2016-12-17mssql: fix drop/alter column with existing default constraintMartin Schleußer1-9/+61
With MSSQL it is not possible to drop or alter a column with an existing constraint. The constraint has to be removed before the operation takes place. In 'datadict-mssqlnative.inc.php' AlterColumnSQL is commented out and DropColumnSQL doesn't care. This tries to fix the problem with the smallest possible impact: - Fix DropColumnSQL(), to allow the drop even with a constraint on that given column. We drop, so any default doesn't matter. - Fix AlterColumnSql(), to allow changes if (and only if !) either a 'new' default is given for an existing default, or there is no existing one at all. So something like 'ALTER TABLE t ALTER COLUMN c INT NOT NULL' with an existing constraint on c will still fail since it can't be determined if keeping or removing the constraint is implied here. Fixes #290 via #297 Changes to original commit: - split long lines, whitespace - Added commit message text from issue #290's description Signed-off-by: Damien Regad <dregad@mantisbt.org>
2016-09-20Bump version to 5.20.7v5.20.7Damien Regad14-14/+14
2016-09-20Update changelogDamien Regad14-14/+14
2016-08-31Bump version to 5.20.6v5.20.6Damien Regad14-14/+14
2016-08-10Bump version to 5.20.5v5.20.5Damien Regad14-14/+14
2016-03-30Bump version to 5.20.4Damien Regad14-14/+14
2016-02-26Revised Firebird driverLester Caine1-15/+90
The new driver is no longer based on ADODB_ibase, but extends ADOConnection instead, and makes use of PHP's fbird_* functions. Fixes #201 Signed-off-by: Damien Regad <dregad@mantisbt.org> Changes to original commit [1]: whitespace, coding guidelines, phpDoc [1] http://hg.lsces.org.uk/bw/bitweaver/externals/adodb/rev/b4efbd3bfe07
2016-01-31A user-defined default Metatype is now availableMark Newnham5-6/+9
The user can now define a constant ADODB_DEFAULT_METATYPE. This overrides the original default value of 'N' and allows the user to control how a field of unknown metaType is presented. The constant controls the behavior of the returned value from the method MetaType(). Fixes #165
2016-01-31addColumnSql now supports ENUM data typesMark Newnham1-0/+18
addColumnSql (and methods that call it, such as createTableSql), now correctly parse the ENUM data type and associated VALUE lists, if the underlying database supports it. actively supported databases known to support it are mysql, postgres, oracle, db2. The statement will fail if the database does not support it (e.g. mssql, sqlite) Fixes #26