Navigation Menu

Skip to content

Commit

Permalink
Fix #906 - make form_field.field_default TEXT column
Browse files Browse the repository at this point in the history
Also make ispublic fields match role_id otherwise we get errors for role_id
greater that 127
  • Loading branch information
rjmackay committed Apr 16, 2013
1 parent 1197f03 commit a309f7b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/config/version.php
Expand Up @@ -9,4 +9,4 @@
* The Ushahidi Engine DB revision number
* Increments when changes are made to the Ushahidi DB schema.
*/
$config['ushahidi_db_version'] = "104";
$config['ushahidi_db_version'] = "106";
9 changes: 9 additions & 0 deletions sql/upgrade105-106.sql
@@ -0,0 +1,9 @@
-- Alter form_field.field_default to TEXT column
-- Alter field_ispublic fields to match role id
ALTER TABLE `form_field`
MODIFY COLUMN `field_default` TEXT,
MODIFY COLUMN `field_ispublic_visible` INT(11) NOT NULL DEFAULT '0',
MODIFY COLUMN `field_ispublic_submit` INT(11) NOT NULL DEFAULT '0';

-- Update DB Version
UPDATE `settings` SET `value` = 106 WHERE `key` = 'db_version';
6 changes: 3 additions & 3 deletions sql/ushahidi.sql
@@ -1,5 +1,5 @@
-- Ushahidi Engine
-- version 104
-- version 106
-- http://www.ushahidi.com


Expand Down Expand Up @@ -680,7 +680,7 @@ CREATE TABLE IF NOT EXISTS `form_field` (
`field_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - TEXTFIELD, 2 - TEXTAREA (FREETEXT), 3 - DATE, 4 - PASSWORD, 5 - RADIO, 6 - CHECKBOX',
`field_required` tinyint(4) DEFAULT '0',
`field_position` tinyint(4) NOT NULL DEFAULT '0',
`field_default` varchar(200) DEFAULT NULL,
`field_default` TEXT,
`field_maxlength` int(11) NOT NULL DEFAULT '0',
`field_width` smallint(6) NOT NULL DEFAULT '0',
`field_height` tinyint(4) DEFAULT '5',
Expand Down Expand Up @@ -1498,5 +1498,5 @@ CREATE TABLE IF NOT EXISTS `verified` (
* Version information for table `settings`
*
*/
UPDATE `settings` SET `value` = '104' WHERE `key` = 'db_version';
UPDATE `settings` SET `value` = '106' WHERE `key` = 'db_version';
UPDATE `settings` SET `value` = '2.6.1' WHERE `key`= 'ushahidi_version';

0 comments on commit a309f7b

Please sign in to comment.