On 19/10/16 10:20, Austin Smith wrote:
> You got me!  I totally missed that!!  :(
> 
> And perhaps I spoke too soon - Got another error.. :( :(
> 
> I ran the command you pasted, everything ran successfully.  I attempted
> to step to foreman-rake db:seed and received notice I had 63 pending
> transactions. 
> 
> So I ran the following:
> 
>     [root@v-atl-centos-7-puppet-01 ~]# foreman-rake db:migrate --trace
>     ** Invoke db:migrate (first_time)
>     ** Invoke environment (first_time)
>     ** Execute environment
>     ** Invoke db:load_config (first_time)
>     ** Execute db:load_config
>     ** Execute db:migrate
>     == 20151104100257 AddHostsCountToHostgroup: migrating
>     =========================
>     -- add_column(:hostgroups, :hosts_count, :integer, {:default=>0})
>     rake aborted!
>     StandardError: An error has occurred, all later migrations canceled:
>     Mysql2::Error: Duplicate column name 'hosts_count': ALTER TABLE
>     `hostgroups` ADD `hosts_count` int(11) DEFAULT [..]

This suggests that the migration's been run already but the fact it ran
hasn't been recorded (in schema_migrations). I'd consider restoring the
DB and running the migration again in case it's been left in a
half-migrated state from earlier errors.

-- 
Dominic Cleal
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" 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].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to