Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema: Use lowercase field types in schema.php #461

Closed
ocean90 opened this issue Jun 7, 2016 · 0 comments
Closed

Schema: Use lowercase field types in schema.php #461

ocean90 opened this issue Jun 7, 2016 · 0 comments
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature is broken.
Milestone

Comments

@ocean90
Copy link
Member

ocean90 commented Jun 7, 2016

dbDelta() uses DESCRIBE to get the current table schema which includes lowercased field types, see http://dev.mysql.com/doc/refman/5.7/en/explain.html.

Output from dbDelta( implode( "\n", gp_schema_get() ), false ); on an existing install:

array(53) {
  ["wp_gp_translations.id"]=>
  string(61) "Changed type of wp_gp_translations.id from int(10) to INT(10)"
  ["wp_gp_translations.original_id"]=>
  string(70) "Changed type of wp_gp_translations.original_id from int(10) to INT(10)"
  ["wp_gp_translations.translation_set_id"]=>
  string(77) "Changed type of wp_gp_translations.translation_set_id from int(10) to INT(10)"
  ["wp_gp_translations.translation_0"]=>
  string(66) "Changed type of wp_gp_translations.translation_0 from text to TEXT"
  ["wp_gp_translations.translation_1"]=>
  string(66) "Changed type of wp_gp_translations.translation_1 from text to TEXT"
  ["wp_gp_translations.translation_2"]=>
  string(66) "Changed type of wp_gp_translations.translation_2 from text to TEXT"
  ["wp_gp_translations.translation_3"]=>
  string(66) "Changed type of wp_gp_translations.translation_3 from text to TEXT"
  ["wp_gp_translations.translation_4"]=>
  string(66) "Changed type of wp_gp_translations.translation_4 from text to TEXT"
  ["wp_gp_translations.translation_5"]=>
  string(66) "Changed type of wp_gp_translations.translation_5 from text to TEXT"
  ["wp_gp_translations.user_id"]=>
  string(66) "Changed type of wp_gp_translations.user_id from int(10) to INT(10)"
  ["wp_gp_translations.status"]=>
  string(73) "Changed type of wp_gp_translations.status from varchar(20) to VARCHAR(20)"
  ["wp_gp_translations.date_added"]=>
  string(71) "Changed type of wp_gp_translations.date_added from datetime to DATETIME"
  ["wp_gp_translations.date_modified"]=>
  string(74) "Changed type of wp_gp_translations.date_modified from datetime to DATETIME"
  ["wp_gp_translations.warnings"]=>
  string(61) "Changed type of wp_gp_translations.warnings from text to TEXT"
  ["wp_gp_translation_sets.id"]=>
  string(65) "Changed type of wp_gp_translation_sets.id from int(10) to INT(10)"
  ["wp_gp_translation_sets.name"]=>
  string(77) "Changed type of wp_gp_translation_sets.name from varchar(255) to VARCHAR(255)"
  ["wp_gp_translation_sets.slug"]=>
  string(77) "Changed type of wp_gp_translation_sets.slug from varchar(255) to VARCHAR(255)"
  ["wp_gp_translation_sets.project_id"]=>
  string(73) "Changed type of wp_gp_translation_sets.project_id from int(10) to INT(10)"
  ["wp_gp_translation_sets.locale"]=>
  string(77) "Changed type of wp_gp_translation_sets.locale from varchar(10) to VARCHAR(10)"
  ["wp_gp_originals.id"]=>
  string(58) "Changed type of wp_gp_originals.id from int(10) to INT(10)"
  ["wp_gp_originals.project_id"]=>
  string(66) "Changed type of wp_gp_originals.project_id from int(10) to INT(10)"
  ["wp_gp_originals.context"]=>
  string(73) "Changed type of wp_gp_originals.context from varchar(255) to VARCHAR(255)"
  ["wp_gp_originals.singular"]=>
  string(58) "Changed type of wp_gp_originals.singular from text to TEXT"
  ["wp_gp_originals.plural"]=>
  string(56) "Changed type of wp_gp_originals.plural from text to TEXT"
  ["wp_gp_originals.references"]=>
  string(56) "Changed type of wp_gp_originals.references from text to "
  ["wp_gp_originals.comment"]=>
  string(57) "Changed type of wp_gp_originals.comment from text to TEXT"
  ["wp_gp_originals.status"]=>
  string(72) "Changed type of wp_gp_originals.status from varchar(255) to VARCHAR(255)"
  ["wp_gp_originals.priority"]=>
  string(67) "Changed type of wp_gp_originals.priority from tinyint(4) to TINYINT"
  ["wp_gp_originals.date_added"]=>
  string(68) "Changed type of wp_gp_originals.date_added from datetime to DATETIME"
  ["wp_gp_glossary_entries.id"]=>
  string(83) "Changed type of wp_gp_glossary_entries.id from int(10) unsigned to INT(10) unsigned"
  ["wp_gp_glossary_entries.glossary_id"]=>
  string(92) "Changed type of wp_gp_glossary_entries.glossary_id from int(10) unsigned to INT(10) unsigned"
  ["wp_gp_glossary_entries.term"]=>
  string(77) "Changed type of wp_gp_glossary_entries.term from varchar(255) to VARCHAR(255)"
  ["wp_gp_glossary_entries.part_of_speech"]=>
  string(87) "Changed type of wp_gp_glossary_entries.part_of_speech from varchar(255) to VARCHAR(255)"
  ["wp_gp_glossary_entries.comment"]=>
  string(64) "Changed type of wp_gp_glossary_entries.comment from text to TEXT"
  ["wp_gp_glossary_entries.translation"]=>
  string(84) "Changed type of wp_gp_glossary_entries.translation from varchar(255) to VARCHAR(255)"
  ["wp_gp_glossary_entries.date_modified"]=>
  string(78) "Changed type of wp_gp_glossary_entries.date_modified from datetime to DATETIME"
  ["wp_gp_glossary_entries.last_edited_by"]=>
  string(83) "Changed type of wp_gp_glossary_entries.last_edited_by from bigint(20) to BIGINT(20)"
  ["wp_gp_glossaries.id"]=>
  string(77) "Changed type of wp_gp_glossaries.id from int(10) unsigned to INT(10) unsigned"
  ["wp_gp_glossaries.translation_set_id"]=>
  string(75) "Changed type of wp_gp_glossaries.translation_set_id from int(10) to INT(10)"
  ["wp_gp_glossaries.description"]=>
  string(62) "Changed type of wp_gp_glossaries.description from text to TEXT"
  ["wp_gp_projects.id"]=>
  string(57) "Changed type of wp_gp_projects.id from int(10) to INT(10)"
  ["wp_gp_projects.name"]=>
  string(69) "Changed type of wp_gp_projects.name from varchar(255) to VARCHAR(255)"
  ["wp_gp_projects.slug"]=>
  string(69) "Changed type of wp_gp_projects.slug from varchar(255) to VARCHAR(255)"
  ["wp_gp_projects.path"]=>
  string(69) "Changed type of wp_gp_projects.path from varchar(255) to VARCHAR(255)"
  ["wp_gp_projects.description"]=>
  string(60) "Changed type of wp_gp_projects.description from text to TEXT"
  ["wp_gp_projects.parent_project_id"]=>
  string(72) "Changed type of wp_gp_projects.parent_project_id from int(10) to INT(10)"
  ["wp_gp_projects.source_url_template"]=>
  string(84) "Changed type of wp_gp_projects.source_url_template from varchar(255) to VARCHAR(255)"
  ["wp_gp_projects.active"]=>
  string(64) "Changed type of wp_gp_projects.active from tinyint(4) to TINYINT"
  ["wp_gp_permissions.id"]=>
  string(60) "Changed type of wp_gp_permissions.id from int(10) to INT(10)"
  ["wp_gp_permissions.user_id"]=>
  string(65) "Changed type of wp_gp_permissions.user_id from int(10) to INT(10)"
  ["wp_gp_permissions.action"]=>
  string(74) "Changed type of wp_gp_permissions.action from varchar(255) to VARCHAR(255)"
  ["wp_gp_permissions.object_type"]=>
  string(79) "Changed type of wp_gp_permissions.object_type from varchar(255) to VARCHAR(255)"
  ["wp_gp_permissions.object_id"]=>
  string(77) "Changed type of wp_gp_permissions.object_id from varchar(255) to VARCHAR(255)"
}
@ocean90 ocean90 changed the title Use lowercase field types in schema.php Schema: Use lowercase field types in schema.php Jun 7, 2016
@ocean90 ocean90 added the [Type] Bug An existing feature is broken. label Jun 7, 2016
@ocean90 ocean90 added this to the 2.1 milestone Jun 7, 2016
@ocean90 ocean90 added the [Status] In Progress Tracking issues with work in progress label Jun 7, 2016
@ocean90 ocean90 self-assigned this Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature is broken.
Projects
None yet
Development

No branches or pull requests

1 participant