Fugee,

You keep making really asinine remarks. Eluding to someone trying to help you 
as Lee Harvey Oswald is just distasteful. 

Either get your attitude straight or get off this mailing list. 

Sent from my iPhone

> On Apr 7, 2017, at 9:18 PM, fugee ohu <[email protected]> wrote:
> 
> 
> 
>> On Friday, April 7, 2017 at 4:05:05 PM UTC-4, Rob Biedenharn wrote:
>> 
>>> On 2017-Apr-7, at 15:26 , fugee ohu <[email protected]> wrote:
>>> 
>>> 
>>> 
>>>> On Friday, April 7, 2017 at 3:02:50 PM UTC-4, Walter Lee Davis wrote:
>>>> Those options are all part of create database, which you would run once, 
>>>> not on every migration. I have usually seen them set at the server level, 
>>>> in the database's ini file. 
>>>> 
>>>> Walter 
>>>> 
>>>> > On Apr 7, 2017, at 2:59 PM, fugee ohu <[email protected]> wrote: 
>>>> > 
>>>> > Trying to get the right syntax for something like this to put in 
>>>> > schema.rb for mysql2 
>>>> > 
>>>> > ENGINE=InnoDB DEFAULT CHARSET=utf8 PRIMARY KEY=ID AUTOINCREMENT 
>>>> > 
>>>> > 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 
>>>> > 
>> 
>>> Hey Walter thanks, Until I learn how to set the server can you give me the 
>>> migrations syntax for each create table statement please, i have something 
>>> in mind similar to this pseudo-line
>>>   create_table "bios", force: :cascade, options: "ENGINE=InnoDB DEFAULT 
>>> CHARSET=utf8 PRIMARY KEY=ID AUTOINCREMENT" do |t|
>>> thanks in advance 
>> 
>> Here's an idea for you: Run the migration and then look into the 
>> db/schema.rb file and compare that to the migration and to the actual 
>> database table.
>> 
>> It would save time for everyone if you tried some of this yourself and then, 
>> if it doesn't make sense, you can say what you did, show the output, explain 
>> why you are confused (and what you expected), and then ask for help.
>> 
>> -Rob
>> 
>> For example:
>> 
>> In the migration file:
>> 
>> class CreateLanguages < ActiveRecord::Migration
>>   def change
>>     create_table :languages do |t|
>>       t.string :iso
>>       t.string :name
>>     end
>>     add_index :languages, :iso
>>   end
>> end
>> 
>> db/schema.rb
>> 
>>   create_table "languages", force: :cascade, options: "ENGINE=InnoDB DEFAULT 
>> CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
>>     t.string "iso"
>>     t.string "name"
>>     t.index ["iso"], name: "index_languages_on_iso", using: :btree
>>   end
>> 
>> MySQL
>> 
>> mysql> show create table languages\G
>> *************************** 1. row ***************************
>>        Table: languagesrcreate_table "artists", force: :cascade, options: 
>> "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci 
>> auto_increment=1" do |t|
>> 
>> Create Table: CREATE TABLE `languages` (
>>   `id` int(11) NOT NULL AUTO_INCREMENT,
>>   `iso` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
>>   `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
>>   PRIMARY KEY (`id`),
>>   KEY `index_languages_on_iso` (`iso`)
>> ) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 
>> COLLATE=utf8_unicode_ci
>> 1 row in set (0.00 sec)
> 
> 
> Here's what I put together so far what where you started me but I still get 
> duplicate entry 0 for primary key
> 
> create_table "artists", force: :cascade, options: "ENGINE=InnoDB DEFAULT 
> CHARSET=utf8 COLLATE=utf8_unicode_ci auto_increment=1" do |t|
> 
> 
>  
> -- 
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/1e5064c8-a2d6-40c2-9139-98c95fc80fac%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/908E7B1F-03AE-4A82-AE82-5CE5412D287C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to