#111 ✓resolved
ashskutches

SQL error during quick install script

Reported by ashskutches | November 17th, 2010 @ 11:32 AM | in 1.0 Release

Hi there,

We're setting up a new webiva installation, and I get the following error when it runs the migrations to create the first client account:

-- create_table("page_paragraphs", {:force=>true})
  SQL (0.6ms)   SHOW TABLES
  SQL (0.0ms)   Mysql::Error: BLOB/TEXT column 'display_body' can't have a default value: CREATE TABLE `page_paragraphs` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `page_revision_id` int(11) DEFAULT 0 NOT NULL, `zone_idx` int(11) DEFAULT 0 NOT NULL, `position` int(11) DEFAULT 0 NOT NULL, `display_type` varchar(255) DEFAULT 'text', `display_body` text DEFAULT '' NOT NULL, `name` varchar(255), `display_module` varchar(255), `site_module_id` int(11), `data` text, `site_feature_id` int(11)) ENGINE=InnoDB
rake aborted!
An error has occurred, all later migrations canceled:

Mysql::Error: BLOB/TEXT column 'display_body' can't have a default value: CREATE TABLE `page_paragraphs` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `page_revision_id` int(11) DEFAULT 0 NOT NULL, `zone_idx` int(11) DEFAULT 0 NOT NULL, `position` int(11) DEFAULT 0 NOT NULL, `display_type` varchar(255) DEFAULT 'text', `display_body` text DEFAULT '' NOT NULL, `name` varchar(255), `display_module` varchar(255), `site_module_id` int(11), `data` text, `site_feature_id` int(11)) ENGINE=InnoDB

(See full trace by running task with --trace)
Error creating initial domain database, please run 'rake --trace cms:create_domain_db DOMAIN_ID=1' manually to see errors

This happens during the InitialDb (1) migration. The problem is fixed if you modify the migration and either remove the default for the text field, or change its type to string.

And if we fix that migration by removing the default value, migration 81 blows up later with the same problem:


Migrating to AddSiteTemplateHead (81)
==  AddSiteTemplateHead: migrating ============================================
-- add_column(:site_templates, :head, :text, {:default=>""})
  SQL (0.0ms)   Mysql::Error: BLOB/TEXT column 'head' can't have a default value: ALTER TABLE `site_templates` ADD `head` text DEFAULT ''
rake aborted!
An error has occurred, all later migrations canceled:

Mysql::Error: BLOB/TEXT column 'head' can't have a default value: ALTER TABLE `site_templates` ADD `head` text DEFAULT ''

(See full trace by running task with --trace)
Error creating initial domain database, please run 'rake --trace cms:create_domain_db DOMAIN_ID=1' manually to see errors

System information:

Mac OS X snow leopard

mysql Ver 14.14 Distrib 5.1.49, for apple-darwin10.4.0 (i386) using readline 6.1

ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.0], MBARI 0x6770, Ruby Enterprise Edition 2010.02

Webiva Version 0.99.1

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages