Ruby on Rails Friday, April 7, 2017

On Friday, April 7, 2017 at 2:59:40 PM UTC-4, fugee ohu wrote:
Trying to get the right syntax for something like this to put in schema.rb for mysql2 


this isn't valid syntax, anyone can correct? additionally i want id to be int(11) and i want the sql-mode traditional

thanks in advance

This is the show table for "bios" It seems to be id int(11) pri key auto_increment so why do i get duplicate entry 0 for primary key error when i try to import from dumpfile  Also, of course I need the id's from the dumpfile to be inserted as the same values otherwise all relations would be borked

| bios  | CREATE TABLE `bios` (
  `artist` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
  `bio` longtext COLLATE utf8_unicode_ci,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `genre` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment