Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I am getting the errors below, when running drush qd to run commerce kickstart:
You are about to create a sites/default/files directory and create a sites/default/settings.php file and CREATE the '/Users/shrop/Sites/commercesite/commercesite.sqlite' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a few seconds ... [ok]
WD php: PDOException: SQLSTATE[HY000]: General error: 1 there is already a table named [error]
message_type: CREATE INDEX main.message_type ON message (type);
; Array
(
)
in db_create_table() (line 2688 of
/Users/shrop/Sites/commercesite/commerce_kickstart/includes/database/database.inc).
WD php: Warning: Cannot modify header information - headers already sent by (output [warning]
started at /usr/local/Cellar/drush/5.8/libexec/includes/output.inc:37) in
drupal_send_headers() (line 1212 of
/Users/shrop/Sites/commercesite/commerce_kickstart/includes/bootstrap.inc).
PDOException: SQLSTATE[HY000]: General error: 1 there is already a table named message_type: CREATE INDEX main.message_type ON message (type);
; Array
(
)
in db_create_table() (line 2688 of /Users/shrop/Sites/commercesite/commerce_kickstart/includes/database/database.inc).
Drush command terminated abnormally due to an unrecoverable error.
The error to look for in the above text:
SQLSTATE[HY000]: General error: 1 there is already a table named message_type: CREATE INDEX main.message_type ON message (type);
; Array
(
)
in db_create_table() (line 2688 of /Users/shrop/Sites/commercesite/commerce_kickstart/includes/database/database.inc).
Below are the drush qd command line configs I am using. The first is the same one used as an example in the drush qd docs "drush help qd" and the second uses the -dev version of commerce kickstart:
drush qd commercesite --core=commerce_kickstart --profile=commerce_kickstart --cache --yes --watchdog
drush qd commercesite --core=commerce_kickstart --profile=commerce_kickstart --cache --yes --watchdog --dev
I really like using drush qd and am curious if others have had similar issues.
Thanks!
Comments
Comment #1
jsacksick CreditAttribution: jsacksick commentedIt seems that you're trying to use this command on an existing install and your database is not dropped before trying to install.
I've never used this command, (I use drush si instead), why don't you run drush sql-drop before ?
Comment #2
mariogalan CreditAttribution: mariogalan commentedSame error here.
"Drush qd" creates a completely new installation with a new sqlite DB so there's nothing to drop.
It looks like that the message_type table is somehow created twice.
Comment #3
shrop CreditAttribution: shrop commentedI am not installing over existing in this case. I double checked to make sure just now. Same error.
Comment #4
shrop CreditAttribution: shrop commentedcorrected grammatical issue in the title
Comment #5
Anthony Fok CreditAttribution: Anthony Fok commentedI ran into the exact same problem when trying to install Commerce Kickstart v2 with SQLite over the web interface:
Same problem with Drupal Commons 3.0. It turns out both distributions use the "message" module, which, when used with SQLite, triggers the bug and aborts the installation.
Since
drush qd
installs with the SQLite backend by default, it also manifests the same problem, and is arguably easier to debug too.It appears that this bug is due to a limitation in SQLite where a table and an index cannot be given the same name in a database. According to http://www.sqlite.org/lang_createtable.html:
I am relatively new to Drupal and do not yet know how to go about fixing it, but hope the above information will help set the record straight, so other Drupal experts can get it fixed. :-)
Comment #6
Anthony Fok CreditAttribution: Anthony Fok commentedI have opened a new bug report for the Message module:
Comment #7
Anthony Fok CreditAttribution: Anthony Fok commentedComment #8
bojanz CreditAttribution: bojanz commentedSince this is a Message issue, let's fix it there and then pull the new release in.
Comment #8.0
bojanz CreditAttribution: bojanz commentedAdded more info on the error