diff options
| author | Martin Schleußer <ms@martin-schleusser.de> | 2016-11-25 16:57:51 +0100 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2016-12-17 14:58:25 +0100 |
| commit | 6a052183430db0a9f74c716d4caeef175c82ea36 (patch) | |
| tree | 6f3b195a684ef29acb7dbaa461d87bf5cafde0b7 /docs/changelog.md | |
| parent | b53a9639b1385c4b2e05bb8447c9b4d6aee62e77 (diff) | |
| download | adodb-6a052183430db0a9f74c716d4caeef175c82ea36.tar.gz adodb-6a052183430db0a9f74c716d4caeef175c82ea36.tar.bz2 adodb-6a052183430db0a9f74c716d4caeef175c82ea36.zip | |
mssql: fix drop/alter column with existing default constraint
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>
Diffstat (limited to 'docs/changelog.md')
0 files changed, 0 insertions, 0 deletions
