php-5.3
Postgresql 8.3 and 9.1

Enabling the Fusion Apply module results in the following errors:

Notice: Array to string conversion in DatabaseSchema_pgsql->createTableSql() (line 131 of /home/graeme/html/includes/database/pgsql/schema.inc).
Notice: Array to string conversion in DatabaseSchema_pgsql->createTableSql() (line 131 of /home/graeme/html/includes/database/pgsql/schema.inc).
Notice: Array to string conversion in DatabaseSchema_pgsql->createTableSql() (line 131 of /home/graeme/html/includes/database/pgsql/schema.inc).
Notice: Array to string conversion in DatabaseSchema_pgsql->createTableSql() (line 131 of /home/graeme/html/includes/database/pgsql/schema.inc).
PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "Array" LINE 10: ...apply_skins_theme_module_element_skin_key UNIQUE (Array, Arr... ^: CREATE TABLE {fusion_apply_skins} ( sid serial CHECK (sid >= 0), theme varchar(128) NOT NULL default '', module varchar(128) NOT NULL default '', element varchar(128) NOT NULL default '', skin varchar(255) NOT NULL default '', options text NOT NULL, status smallint NOT NULL default 0, PRIMARY KEY (sid), CONSTRAINT fusion_apply_skins_theme_module_element_skin_key UNIQUE (Array, Array, Array, Array) ); Array ( ) in db_create_table() (line 2684 of /home/graeme/html/includes/database/database.inc).

Comments

pixelpreview@gmail.com’s picture

same problem with mysql
PDOException : SQLSTATE[42000]: Syntax error or access violation: 1071

sheena_d’s picture

Can you try uninstalling the module, applying the patch at http://drupal.org/node/1325542#comment-5190902 and then re-installing to see if the issue persists?

Thanks!

esmerel’s picture

Status: Active » Postponed (maintainer needs more info)
sheena_d’s picture

Actually, I just created a dev release, so you could just try that version instead of applying the patch I linked to.

murgatroid’s picture

Still not working. SQL log reveals the following

ERROR: syntax error at or near "Array" at character 381
STATEMENT: CREATE TABLE fusion_apply_skins (
sid serial CHECK (sid >= 0),
theme varchar(128) NOT NULL default '',
module varchar(128) NOT NULL default '',
element varchar(128) NOT NULL default '',
skin varchar(255) NOT NULL default '',
options text NOT NULL,
status smallint NOT NULL default 0,
PRIMARY KEY (sid),
CONSTRAINT fusion_apply_skins_theme_module_element_skin_key UNIQUE (Array, Array, Array, Array)
)

Can I ask why the constraint is contructed as unique keys with integer parameters? What's the funkiness which you are trying to achieve which I do not yet grok? (ok I'm guessing FILLFACTOR, but please, correct me if needed)
'unique keys' => array(
'theme_module_element_skin' => array(array('theme', 40), array('module', 40), array('element', 40), array('skin', 40)),

changing the array to
'theme_module_element_skin' => array('theme', 'module', 'element', 'skin'),

unbreaks the install. Is there another/better way to do this?

aquariumtap’s picture

For a full history of why those integers were introduced, read over this issue: #1325542: fusion_apply_skins table - "Specified key was too long; max key length is 1000 bytes". Their purpose is to abide by prefix limits in MySQL indexes.

@murgatroid, are you using Postgresql as well? If not, which database system/version are you using?

murgatroid’s picture

As per my initial post, I've tested it on 8.3 and 9.1. Also, the database has been sqeaky clean each time - drop db, drop site, re-install from scratch

sheena_d’s picture

I think aquariumtap meant to direct that database version question to @pixelpreview.

aquariumtap’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

My apologies, I mistakenly thought somebody other than @murgatroid had written the original post. But yes, @pixelpreview, please let us know which version of MySQL you are using.

If PostgreSQL doesn't support prefix limits, then DBTNG needs to reflect that. This should be written up as a bug in core.