[wp-trac] [WordPress Trac] #38936: Alter Table Always Expects a COLUMN; Crashes on a CONSTRAINT

WordPress Trac noreply at wordpress.org
Tue Nov 29 17:46:47 UTC 2016


#38936: Alter Table Always Expects a COLUMN; Crashes on a CONSTRAINT
-----------------------------+------------------------------
 Reporter:  philsown         |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by philsown):

 Here's the SQL I'm running

 {{{#!php
 <?php
 $sql = '
 CREATE TABLE `wp_vendor_plugin_activities` (
     `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
     `activity_type_id` int(10) unsigned NOT NULL,
     `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
     `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
     `created_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\',
     `updated_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\',
     PRIMARY KEY (`id`),
     KEY `vendor_plugin_activities_activity_type_id_foreign`
 (`activity_type_id`),
     CONSTRAINT `vendor_plugin_activities_activity_type_id_foreign` FOREIGN
 KEY (`activity_type_id`) REFERENCES `wp_vendor_plugin_activity_types`
 (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';

 dbDelta($sql);
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38936#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list