Re: [Rails] How do I load schema in rails 6

2019-11-30 Thread fugee ohu


On Friday, November 29, 2019 at 7:48:17 AM UTC-5, Ariel Juodziukynas wrote:
>
> What do you mean that you have an error en your schema.rb? When you run a 
> migration, rails dumps the current database schema (rails db:schema:dump). 
> Maybe you have some merge conflict if you are using source control and 
> someone fixed the conflict wrong, but the file shouldn't have errors since 
> it's just a dump of the actual running database's schema.
>
> You have all the db: tasks (run `rails -T | grep 'db:' to list all) 
> including running the migrations, those are the only commands to change 
> your database schema using rails.
>
> El vie., 29 nov. 2019 a las 7:11, fugee ohu ( >) escribió:
>
>>
>>
>> On Tuesday, November 26, 2019 at 9:37:54 AM UTC-5, Ariel Juodziukynas 
>> wrote:
>>>
>>> You were trying to reload the schema, db:schema:load requires an empty 
>>> database, I guessed you were OK with removing the data. db:reset it's just 
>>> a shortcut for drop > create > schema:load > seed.
>>>
>>> Why do you want to load the schema if you already have data and you 
>>> don't want to lose it? that makes no sense, if you already have data then 
>>> you already have the schema loaded.
>>>
>>> El mar., 26 nov. 2019 a las 10:59, Hasan Diwan () 
>>> escribió:
>>>
 [response inline]


 On Tue, 26 Nov 2019 at 05:55, fugee ohu  wrote:

> What would that do to my data 
>

 You'll need to back it up. Which database are you using? -- H 
 -- 
 OpenPGP: 
 https://sks-keyservers.net/pks/lookup?op=get=0xFEBAD7FFD041BBA1
 If you wish to request my time, please do so using 
 *bit.ly/hd1AppointmentRequest 
 *.
 Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest 
 *.

 Sent
  
 from my mobile device
 Envoye de mon portable

 -- 
 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 rubyonra...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/rubyonrails-talk/CAP%2BbYWAGfMrun5ZYzUuJRbbxx24-o3iKZfKSBv%3DEx52nA3fRkA%40mail.gmail.com
  
 
 .

>>>
>> Yes right There's no data I was just curious about the db:reset command 
>> because I never heard of it before I thought there's no possiblity for an 
>> error in schema.rb How can I have an error in my schema.rb I'm thinking 
>> maybe there's a new way to load the schema in rails 6 I created the 
>> database and tried to load the schema
>>
>> -- 
>> 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 rubyonra...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rubyonrails-talk/ab1850ac-9086-41de-a700-3419637f9aba%40googlegroups.com
>>  
>> 
>> .
>>
>
I was developing on a laptop and the screen stopped working so I took the 
app over to my desktop and can't load the schema I'm gonna try some 
different mysql2 versions It's all these associations in my models now 
causing the errors like "can't update parent row" I'll go through all of 
them and comment out lines so I can load the schema  

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/98463da5-ba65-45c6-a7f6-eb25d96177e4%40googlegroups.com.


Re: [Rails] How do I load schema in rails 6

2019-11-29 Thread Ariel Juodziukynas
What do you mean that you have an error en your schema.rb? When you run a
migration, rails dumps the current database schema (rails db:schema:dump).
Maybe you have some merge conflict if you are using source control and
someone fixed the conflict wrong, but the file shouldn't have errors since
it's just a dump of the actual running database's schema.

You have all the db: tasks (run `rails -T | grep 'db:' to list all)
including running the migrations, those are the only commands to change
your database schema using rails.

El vie., 29 nov. 2019 a las 7:11, fugee ohu () escribió:

>
>
> On Tuesday, November 26, 2019 at 9:37:54 AM UTC-5, Ariel Juodziukynas
> wrote:
>>
>> You were trying to reload the schema, db:schema:load requires an empty
>> database, I guessed you were OK with removing the data. db:reset it's just
>> a shortcut for drop > create > schema:load > seed.
>>
>> Why do you want to load the schema if you already have data and you don't
>> want to lose it? that makes no sense, if you already have data then you
>> already have the schema loaded.
>>
>> El mar., 26 nov. 2019 a las 10:59, Hasan Diwan ()
>> escribió:
>>
>>> [response inline]
>>>
>>>
>>> On Tue, 26 Nov 2019 at 05:55, fugee ohu  wrote:
>>>
 What would that do to my data

>>>
>>> You'll need to back it up. Which database are you using? -- H
>>> --
>>> OpenPGP:
>>> https://sks-keyservers.net/pks/lookup?op=get=0xFEBAD7FFD041BBA1
>>> If you wish to request my time, please do so using 
>>> *bit.ly/hd1AppointmentRequest
>>> *.
>>> Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
>>> *.
>>>
>>> Sent
>>> from my mobile device
>>> Envoye de mon portable
>>>
>>> --
>>> 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 rubyonra...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/rubyonrails-talk/CAP%2BbYWAGfMrun5ZYzUuJRbbxx24-o3iKZfKSBv%3DEx52nA3fRkA%40mail.gmail.com
>>> 
>>> .
>>>
>>
> Yes right There's no data I was just curious about the db:reset command
> because I never heard of it before I thought there's no possiblity for an
> error in schema.rb How can I have an error in my schema.rb I'm thinking
> maybe there's a new way to load the schema in rails 6 I created the
> database and tried to load the schema
>
> --
> 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 rubyonrails-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/ab1850ac-9086-41de-a700-3419637f9aba%40googlegroups.com
> 
> .
>

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcDH%3D_BCnQpVCYoT1WZDpwqXhOpQkp26CBeU3zUfqxL78g%40mail.gmail.com.


Re: [Rails] How do I load schema in rails 6

2019-11-29 Thread fugee ohu


On Tuesday, November 26, 2019 at 9:37:54 AM UTC-5, Ariel Juodziukynas wrote:
>
> You were trying to reload the schema, db:schema:load requires an empty 
> database, I guessed you were OK with removing the data. db:reset it's just 
> a shortcut for drop > create > schema:load > seed.
>
> Why do you want to load the schema if you already have data and you don't 
> want to lose it? that makes no sense, if you already have data then you 
> already have the schema loaded.
>
> El mar., 26 nov. 2019 a las 10:59, Hasan Diwan ( >) escribió:
>
>> [response inline]
>>
>>
>> On Tue, 26 Nov 2019 at 05:55, fugee ohu > 
>> wrote:
>>
>>> What would that do to my data 
>>>
>>
>> You'll need to back it up. Which database are you using? -- H 
>> -- 
>> OpenPGP: 
>> https://sks-keyservers.net/pks/lookup?op=get=0xFEBAD7FFD041BBA1
>> If you wish to request my time, please do so using 
>> *bit.ly/hd1AppointmentRequest 
>> *.
>> Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest 
>> *.
>>
>> Sent 
>> from my mobile device
>> Envoye de mon portable
>>
>> -- 
>> 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 rubyonra...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rubyonrails-talk/CAP%2BbYWAGfMrun5ZYzUuJRbbxx24-o3iKZfKSBv%3DEx52nA3fRkA%40mail.gmail.com
>>  
>> 
>> .
>>
>
Yes right There's no data I was just curious about the db:reset command 
because I never heard of it before I thought there's no possiblity for an 
error in schema.rb How can I have an error in my schema.rb I'm thinking 
maybe there's a new way to load the schema in rails 6 I created the 
database and tried to load the schema

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/ab1850ac-9086-41de-a700-3419637f9aba%40googlegroups.com.


Re: [Rails] How do I load schema in rails 6

2019-11-26 Thread Ariel Juodziukynas
You were trying to reload the schema, db:schema:load requires an empty
database, I guessed you were OK with removing the data. db:reset it's just
a shortcut for drop > create > schema:load > seed.

Why do you want to load the schema if you already have data and you don't
want to lose it? that makes no sense, if you already have data then you
already have the schema loaded.

El mar., 26 nov. 2019 a las 10:59, Hasan Diwan ()
escribió:

> [response inline]
>
>
> On Tue, 26 Nov 2019 at 05:55, fugee ohu  wrote:
>
>> What would that do to my data
>>
>
> You'll need to back it up. Which database are you using? -- H
> --
> OpenPGP:
> https://sks-keyservers.net/pks/lookup?op=get=0xFEBAD7FFD041BBA1
> If you wish to request my time, please do so using 
> *bit.ly/hd1AppointmentRequest
> *.
> Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
> *.
>
> Sent
> from my mobile device
> Envoye de mon portable
>
> --
> 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 rubyonrails-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/CAP%2BbYWAGfMrun5ZYzUuJRbbxx24-o3iKZfKSBv%3DEx52nA3fRkA%40mail.gmail.com
> 
> .
>

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcBChEKx51UOE_-g9Xc-UnnfL0HaBkrevL_%3DmyQ9Bfng7Q%40mail.gmail.com.


Re: [Rails] How do I load schema in rails 6

2019-11-26 Thread Hasan Diwan
[response inline]


On Tue, 26 Nov 2019 at 05:55, fugee ohu  wrote:

> What would that do to my data
>

You'll need to back it up. Which database are you using? -- H
-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAP%2BbYWAGfMrun5ZYzUuJRbbxx24-o3iKZfKSBv%3DEx52nA3fRkA%40mail.gmail.com.


Re: [Rails] How do I load schema in rails 6

2019-11-26 Thread fugee ohu


On Tuesday, November 26, 2019 at 6:40:34 AM UTC-5, Ariel Juodziukynas wrote:
>
> You can run rails db:reset then
>
> El mar., 26 nov. 2019 05:37, Hasan Diwan > 
> escribió:
>
>> [response inline]
>>
>> On Tue, 26 Nov 2019 at 00:00, fugee ohu > 
>> wrote:
>>
>>> Complains that users table already exists 
>>>
>>
>> bundle exec rails db:drop db:create db:migrate db:schema:load 
>>
>> Seems you had a mistake in a migration. So, you need to reset your 
>> database to pristine state and start again. Hope this helps! -- H
>>
>> -- 
>> OpenPGP: 
>> https://sks-keyservers.net/pks/lookup?op=get=0xFEBAD7FFD041BBA1
>> If you wish to request my time, please do so using 
>> *bit.ly/hd1AppointmentRequest 
>> *.
>> Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest 
>> *.
>>
>> Sent 
>> from my mobile device
>> Envoye de mon portable
>>
>> -- 
>> 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 rubyonra...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rubyonrails-talk/CAP%2BbYWDPz0-BRfO5ohk%3DT76WKCb6JYhyqudqzqznnEBcQ0eOkQ%40mail.gmail.com
>>  
>> 
>> .
>>
>
What would that do to my data 

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/961e7dba-2e77-4bcc-86d0-08db0519c018%40googlegroups.com.


Re: [Rails] How do I load schema in rails 6

2019-11-26 Thread Ariel Juodziukynas
You can run rails db:reset then

El mar., 26 nov. 2019 05:37, Hasan Diwan  escribió:

> [response inline]
>
> On Tue, 26 Nov 2019 at 00:00, fugee ohu  wrote:
>
>> Complains that users table already exists
>>
>
> bundle exec rails db:drop db:create db:migrate db:schema:load
>
> Seems you had a mistake in a migration. So, you need to reset your
> database to pristine state and start again. Hope this helps! -- H
>
> --
> OpenPGP:
> https://sks-keyservers.net/pks/lookup?op=get=0xFEBAD7FFD041BBA1
> If you wish to request my time, please do so using 
> *bit.ly/hd1AppointmentRequest
> *.
> Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
> *.
>
> Sent
> from my mobile device
> Envoye de mon portable
>
> --
> 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 rubyonrails-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/CAP%2BbYWDPz0-BRfO5ohk%3DT76WKCb6JYhyqudqzqznnEBcQ0eOkQ%40mail.gmail.com
> 
> .
>

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcDSv9nTPNNmz3cjdXy4eLDB2ZU9%2B1LLz0-DVS6QV-PWGg%40mail.gmail.com.


Re: [Rails] How do I load schema in rails 6

2019-11-26 Thread Hasan Diwan
[response inline]

On Tue, 26 Nov 2019 at 00:00, fugee ohu  wrote:

> Complains that users table already exists
>

bundle exec rails db:drop db:create db:migrate db:schema:load

Seems you had a mistake in a migration. So, you need to reset your database
to pristine state and start again. Hope this helps! -- H

-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAP%2BbYWDPz0-BRfO5ohk%3DT76WKCb6JYhyqudqzqznnEBcQ0eOkQ%40mail.gmail.com.


Re: [Rails] How do I load schema in rails 6

2019-11-25 Thread fugee ohu


On Monday, November 25, 2019 at 10:05:18 PM UTC-5, Ariel Juodziukynas wrote:
>
> It is `rails db:schema:load`, run `rails -T` to list all the available 
> tasks.
>
> El lun., 25 nov. 2019 a las 23:13, fugee ohu ( >) escribió:
>
>> Is there a new command to load the schema in rails 6?
>>
>> -- 
>> 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 rubyonra...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rubyonrails-talk/a77d507f-2927-4e38-8f88-643e8e24030f%40googlegroups.com
>>  
>> 
>> .
>>
>

Complains that users table already exists 

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/d08accdf-2647-405c-98b9-6f794baecdcc%40googlegroups.com.


Re: [Rails] How do I load schema in rails 6

2019-11-25 Thread Ariel Juodziukynas
It is `rails db:schema:load`, run `rails -T` to list all the available
tasks.

El lun., 25 nov. 2019 a las 23:13, fugee ohu ()
escribió:

> Is there a new command to load the schema in rails 6?
>
> --
> 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 rubyonrails-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/a77d507f-2927-4e38-8f88-643e8e24030f%40googlegroups.com
> 
> .
>

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcAzgfHGM03nmXbrF%3D3bOOLh313EWSzVCrg6YTaNDPoJGw%40mail.gmail.com.


[Rails] How do I load schema in rails 6

2019-11-25 Thread fugee ohu
Is there a new command to load the schema in rails 6?

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/a77d507f-2927-4e38-8f88-643e8e24030f%40googlegroups.com.