2.8.0 conversion scripts require Profile2 scripts

Description

Need profile2 conversion scripts added to trunk/reference sakai_2_8_0_*_conversion.sql (mysql/oracle). See info below.

First Liquibase run comparing an auto.ddl-generated sakai-2.8.0-b04 MySQL 5.1 db against a sakai-2.7.1 MySQL 5.1 db upgraded to 2.8.0 using trunk. Diff'ing between the two databases reveals an anemic 2.7.1->2.8.0 converted db. The missing tables, columns, etc. encountered tend to be clustered around the following projects:

announcement
jobscheduler
profile2
reset-pass (account validator)
sitestats
shortenedurl

In short, the conversion scripts are incomplete at present and constitute a 2.8.0 blocker. If you are responsible for missing scripts please add them and then let me know when complete so that I can test the scripts again.

Cheers,

Anthony

___________________________________________

Luthuli:liquibase-1.9.5 arwhyte$ java -jar ./liquibase-1.9.5.jar --driver=com.mysql.jdbc.Driver --url=jdbc:mysql://127.0.0.1:3306/sakai280convert --username=sakaiuser --password=sushi diff --baseUrl=jdbc:mysql://127.0.0.1:3306/sakai280autogen --baseUsername=sakaiuser --basePassword=sushi

Diff Results:
Base Database: sakaiuser jdbc:mysql://127.0.0.1:3306/sakai280autogen
Target Database: sakaiuser jdbc:mysql://127.0.0.1:3306/sakai280convert

Product Name: EQUAL
Product Version: EQUAL
2.8.0 auto.ddl=true Missing Tables: NONE FOR PROFILE2

2.8.0 auto.ddl=true Unexpected Tables: [UNEXPECTED -- conversion scripts missing CREATE TABLE statements]
profile_company_profiles_t
profile_gallery_images_t
profile_images_official_t
profile_kudos_t
profile_message_participants_t
profile_message_threads_t
profile_messages_t
profile_social_info_t
...

Missing Views: NONE
Unexpected Views: NONE

2.8.0 auto.ddl=true Missing Columns: [UNEXPECTED -- do we need to move data stored in these fields elsewhere?]
profile_privacy_t.ACADEMIC_INFO
profile_privacy_t.SEARCH

2.8.0 auto.ddl=true Unexpected Columns: [UNEXPECTED -- conversion scripts missing ALTER TABLE...ADD COLUMN statements]
...
profile_preferences_t.EMAIL_MESSAGE_NEW
profile_preferences_t.EMAIL_MESSAGE_REPLY
profile_preferences_t.SHOW_GALLERY_FEED
profile_preferences_t.SHOW_KUDOS
profile_preferences_t.USE_OFFICIAL_IMAGE
profile_privacy_t.BUSINESS_INFO
profile_privacy_t.MESSAGES
profile_privacy_t.MY_KUDOS
profile_privacy_t.MY_PICTURES
profile_privacy_t.SOCIAL_NETWORKING_INFO
profile_privacy_t.STAFF_INFO
profile_privacy_t.STUDENT_INFO

2.8.0 auto.ddl=true Changed Columns: [DATA TYPE MISMATCHES]
email_template_item.HTMLMESSAGE
from TEXT to LONGTEXT
gb_grade_record_t.USER_ENTERED_GRADE
from VARCHAR(127) to VARCHAR(255)
profile_images_t.RESOURCE_MAIN
from VARCHAR(255) to TEXT
profile_images_t.RESOURCE_THUMB
from VARCHAR(255) to TEXT

2.8.0 auto.ddl=true Missing Foreign Keys: NONE FOR PROFILE2
2.8.0 auto.ddl=true Unexpected Foreign Keys: NONE FOR PROFILE2
2.8.0 auto.ddl=true Missing Primary Keys: NONE FOR PROFILE2
2.8.0 auto.ddl=true Unexpected Primary Keys:
null on profile_company_profiles_t(ID)
null on profile_gallery_images_t(ID)
null on profile_images_official_t(USER_UUID)
null on profile_kudos_t(USER_UUID)
null on profile_message_participants_t(ID)
null on profile_message_threads_t(ID)
null on profile_messages_t(ID)
null on profile_social_info_t(USER_UUID)
...
Missing Unique Constraints: NONE
Unexpected Unique Constraints: NONE

2.8.0 auto.ddl=true Missing Indexes: NONE FOR PROFILE2
2.8.0 auto.ddl=true Unexpected Indexes: NONE FOR PROFILE2

Missing Sequences: NONE
Unexpected Sequences: NONE

Environment

None

Test Plan

None

is depended on by

Activity

Show:

Steve Swinsburg February 2, 2011 at 3:18 AM

That last one (key length) is from shortenedurl. The SQL is direct from hbm2ddl. Will look into it. Thanks for removing the others, I'll need to do the same for the Profile2 ddl itself.

Hudson CI Server February 1, 2011 at 9:09 PM

Integrated in sakai trunk #433 (See http://builds.sakaiproject.org:8080/job/sakai%20trunk/433/)
remove redundant profile2 scripts
remove redundant profile2 scripts

Anthony Whyte February 1, 2011 at 8:38 PM

Liquibase diff following r87926-27: see profile2 variations below.

Luthuli:liquibase-1.9.5 arwhyte$ java -jar ./liquibase-1.9.5.jar --driver=com.mysql.jdbc.Driver --url=jdbc:mysql://127.0.0.1:3306/sakai280convert --username=sakaiuser --password=sushi diff --baseUrl=jdbc:mysql://127.0.0.1:3306/sakai280autogen --baseUsername=sakaiuser --basePassword=sushi

Diff Results:
Base Database: sakaiuser jdbc:mysql://127.0.0.1:3306/sakai280autogen
Target Database: sakaiuser jdbc:mysql://127.0.0.1:3306/sakai280convert
Product Name: EQUAL
Product Version: EQUAL
Missing Tables: NONE FOR PROFILE2
Unexpected Tables: NONE FOR PROFILE2
Missing Views: NONE
Unexpected Views: NONE
Missing Columns: NONE
Unexpected Columns: NONE FOR PROFILE2
Changed Columns:
. . .
profile_gallery_images_t.RESOURCE_MAIN
from VARCHAR(255) to TEXT
profile_gallery_images_t.RESOURCE_THUMB
from VARCHAR(255) to TEXT
profile_images_t.RESOURCE_MAIN
from VARCHAR(255) to TEXT
profile_images_t.RESOURCE_THUMB
from VARCHAR(255) to TEXT
Missing Foreign Keys: NONE FOR PROFILE2
Unexpected Foreign Keys: NONE FOR PROFILE2
Missing Primary Keys: NONE FOR PROFILE2
Unexpected Primary Keys: NONE FOR PROFILE2
Missing Unique Constraints: NONE
Unexpected Unique Constraints: NONE
Missing Indexes:
. . .
PROFILE_COMPANY_PROFILES_USER_UUID_I unique on profile_company_profiles_t(USER_UUID)
PROFILE_GALLERY_IMAGES_USER_UUID_I unique on profile_gallery_images_t(USER_UUID)
PROFILE_MESSAGE_PARTICIPANT_DELETED_I unique on profile_message_participants_t(MESSAGE_DELETED)
PROFILE_MESSAGE_PARTICIPANT_MESSAGE_ID_I unique on profile_message_participants_t(MESSAGE_ID)
PROFILE_MESSAGE_PARTICIPANT_READ_I unique on profile_message_participants_t(MESSAGE_READ)
PROFILE_MESSAGE_PARTICIPANT_UUID_I unique on profile_message_participants_t(PARTICIPANT_UUID)
PROFILE_MESSAGES_DATE_POSTED_I unique on profile_messages_t(DATE_POSTED)
PROFILE_MESSAGES_FROM_UUID_I unique on profile_messages_t(FROM_UUID)
PROFILE_MESSAGES_THREAD_I unique on profile_messages_t(MESSAGE_THREAD)
FKD3B8420DC896C347 unique on reports_param(reportId)
FKA6F2CE9DC896C347 unique on reports_result(reportId)
KEY_INDEX unique on url_randomised_mappings_t(TINY)
Unexpected Indexes: NONE FOR PROFILE2
Missing Sequences: NONE
Unexpected Sequences: NONE

Anthony Whyte February 1, 2011 at 8:31 PM

Redundant profile2 scripts removed from /reference 2.8.0 conversion scripts, r87926-27.

Anthony Whyte February 1, 2011 at 8:23 PM

Encountered 5 errors when I run your conversion script additions in Navicat. See below. Issues I, II are redundant additions and can be removed. Issue III, involving a missing key length, is something I've not had a chance to review (I need to head to bed so will check in the morning).

Another liquibase run with all the lines below commented out confirms that neither profile_external_integration_t needs to be added nor the 4 columns dropped for profile_preferences_T; the key length issue noted below remains to be addressed.

I. PRE-EXISTING TABLE (2.7.1 deploys profile2-1.3.11). Remove this (I'm happy to do it).

– ---------------------------- – Table structure for `profile_external_integration_t`
– ---------------------------- DROP TABLE IF EXISTS `profile_external_integration_t`;
CREATE TABLE `profile_external_integration_t` (
`USER_UUID` varchar(99) COLLATE utf8_bin NOT NULL,
`TWITTER_TOKEN` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`TWITTER_SECRET` varchar(255) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`USER_UUID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

error: profile_external_integration_t already exists in 2.7.1 (indeed it does)

II. MISSING COLUMNS (these cols appear to have been removed prior to profile2-1.3.11 (deployed by 2.7.1))

– remove twitter from preferences ()
alter table PROFILE_PREFERENCES_T drop TWITTER_ENABLED

error : Can't DROP 'TWITTER_ENABLED'; check that column/key exists

alter table PROFILE_PREFERENCES_T drop TWITTER_USERNAME

error : Can't DROP 'TWITTER_USERNAME'; check that column/key exists

alter table PROFILE_PREFERENCES_T drop TWITTER_PASSWORD

error : Can't DROP 'TWITTER_PASSWORD'; check that column/key exists

profile2-1.3.11
– ---------------------------- – Table structure for `profile_preferences_t`
– ---------------------------- DROP TABLE IF EXISTS `profile_preferences_t`;
CREATE TABLE `profile_preferences_t` (
`USER_UUID` varchar(99) COLLATE utf8_bin NOT NULL,
`EMAIL_REQUEST` bit(1) NOT NULL,
`EMAIL_CONFIRM` bit(1) NOT NULL,
PRIMARY KEY (`USER_UUID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

III. KEY LENGTH?

create index URL_INDEX on URL_RANDOMISED_MAPPINGS_T (URL)

error : BLOB/TEXT column 'URL' used in key specification without a key length

Fixed

Details

Assignee

Reporter

Conversion Script Required

Yes

Components

Fix versions

Affects versions

Priority

Created January 31, 2011 at 12:24 PM
Updated July 15, 2014 at 7:30 AM
Resolved February 9, 2011 at 11:20 AM