diff options
| author | Mark Newnham <mark@newnhams.com> | 2018-08-26 11:26:11 -0600 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2019-12-30 00:29:41 +0100 |
| commit | 245b8fa3e5744ef8a838dc0a511c4f6edcfdd5a0 (patch) | |
| tree | 30cce245efaa72ce6e65d3a6fa3647a996872ae2 /datadict | |
| parent | 248188451a329c9f1cec9c0a26206c7d57bb9784 (diff) | |
| download | adodb-245b8fa3e5744ef8a838dc0a511c4f6edcfdd5a0.tar.gz adodb-245b8fa3e5744ef8a838dc0a511c4f6edcfdd5a0.tar.bz2 adodb-245b8fa3e5744ef8a838dc0a511c4f6edcfdd5a0.zip | |
Provides Control of BLOB data dictionary feature
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
Diffstat (limited to 'datadict')
| -rw-r--r-- | datadict/datadict-mysql.inc.php | 2 | ||||
| -rw-r--r-- | datadict/datadict-postgres.inc.php | 3 | ||||
| -rw-r--r-- | datadict/datadict-sqlite.inc.php | 5 |
3 files changed, 8 insertions, 2 deletions
diff --git a/datadict/datadict-mysql.inc.php b/datadict/datadict-mysql.inc.php index 640fb87a..5ae33b1d 100644 --- a/datadict/datadict-mysql.inc.php +++ b/datadict/datadict-mysql.inc.php @@ -24,6 +24,8 @@ class ADODB2_mysql extends ADODB_DataDict { var $dropIndex = 'DROP INDEX %s ON %s'; var $renameColumn = 'ALTER TABLE %s CHANGE COLUMN %s %s %s'; // needs column-definition! + public $blobAllowsNotNull = true; + function MetaType($t,$len=-1,$fieldobj=false) { diff --git a/datadict/datadict-postgres.inc.php b/datadict/datadict-postgres.inc.php index 8fcb5712..68bdeddc 100644 --- a/datadict/datadict-postgres.inc.php +++ b/datadict/datadict-postgres.inc.php @@ -25,6 +25,9 @@ class ADODB2_postgres extends ADODB_DataDict { var $renameTable = 'ALTER TABLE %s RENAME TO %s'; // at least since 7.1 var $dropTable = 'DROP TABLE %s CASCADE'; + public $blobAllowsDefaultValue = true; + public $blobAllowsNotNull = true; + function MetaType($t,$len=-1,$fieldobj=false) { if (is_object($t)) { diff --git a/datadict/datadict-sqlite.inc.php b/datadict/datadict-sqlite.inc.php index 44b949c9..52c031ca 100644 --- a/datadict/datadict-sqlite.inc.php +++ b/datadict/datadict-sqlite.inc.php @@ -25,8 +25,9 @@ class ADODB2_sqlite extends ADODB_DataDict { var $dropIndex = 'DROP INDEX IF EXISTS %s'; var $renameTable = 'ALTER TABLE %s RENAME TO %s'; - - + public $blobAllowsDefaultValue = true; + public $blobAllowsNotNull = true; + function ActualType($meta) { switch(strtoupper($meta)) { |
