Well,
I am not sure how you think that should behave, but, here is my 001
migration:
def self.up
create_table "users" do |t|
...
So there is no force. But I am still getting:
== CommunityEngineToVersion72: migrating
=====================================
== CreateUsers: migrating
====================================================
-- create_table("users")
rake aborted!
An error has occurred, all later migrations canceled:
An error has occurred, all later migrations canceled:
Mysql::Error: Table 'users' already exists: CREATE TABLE `users` (`id`
int(11) DEFAULT NULL auto_increment PRIMARY KEY, `login` varchar(255),
`email` varchar(255), `description` text, `avatar_id` int(11),
`crypted_password` varchar(40), `salt` varchar(40), `created_at`
datetime, `updated_at` datetime, `remember_token` varchar(255),
`remember_token_expires_at` datetime, `stylesheet` text, `view_count`
int(11) DEFAULT 0, `admin` tinyint(1) DEFAULT 0, `vendor` tinyint(1)
DEFAULT 0) ENGINE=InnoDB
I was unaware that create_table without force would let the table
exist... I've never seen that before (and still haven't!) Could this
be a rails or rake version issue too to support this?
On Dec 29, 4:12 pm, Bruno Bornsztein <[email protected]>
wrote:
> Here's the relevant commit on edge:
>
> http://github.com/bborn/communityengine/commit/747fdf48f238ba7095bcc9...
>
>
>
> On Tue, Dec 29, 2009 at 9:03 AM, phil <[email protected]> wrote:
> > Bruno,
> > Either I am missing something, or edge still wants to drop my tables!
>
> > Now, I am no git-master... but I did
> > git submodule add git://github.com/bborn/communityengine.git vendor/
> > plugins/community_engine
> > the cd'd into community engine and did a pull on edge and git checkout
> > to edge
>
> > I then did the
> > script/generate plugin_migration
>
> > Which created
> > db/migrate/20091229150017_community_engine_to_version_72.rb
>
> > I don't see what is different than trunk.
>
> > On Dec 29, 3:30 pm, phil <[email protected]> wrote:
> > > Thanks Bruno!
>
> > > The app is pretty complex (it is a running commercial site... actually
> > > probably crazy for me to even think of integrating CE!)
>
> > > I'm going to try the edge version and see how that goes.
>
> > > On Dec 28, 4:34 pm, Bruno Bornsztein <[email protected]>
> > > wrote:
>
> > > > Hi Phil,
> > > > The latest version of CE (edge:
> >http://github.com/bborn/communityengine/tree/edge) doesn't force the
> > > > creation of tables in the migrations, so it won't drop your existing
> > user
> > > > table when you migrate. Since you already have a users table, you'll
> > need to
> > > > manually make sure that it has the correct columns needed for CE.
>
> > > > The easiest way to do this is to create a bare CE app (rails
> > your_app_name
> > > > -mhttp://www.communityengine.org/edge_install_template.rb) and then
> > look at
> > > > the generated schema.rb and compare to your existing schema.
>
> > > > Another option, depending on how complex your current app is, is to
> > just
> > > > dump your users table, run the CE migration (blowing away your old
> > users
> > > > table), and then re-import your users.
>
> > > > Good luck,
> > > > Bruno
>
> > > > On Tue, Dec 22, 2009 at 9:08 AM, phil <[email protected]> wrote:
>
> > > > > I have seen this asked - but never answered. it is claimed that you
> > > > > can add CE to an existing rails app. But, if you create the migration
> > > > > and try and run it the first thing it tries to do is drop your users
> > > > > table!
>
> > > > > I don't actually see any documentation anywhere about how to add it
> > to
> > > > > a site.
>
> > > > > Anyone have any documentation or experience in this?
>
> > > > > Thanks!
>
> > > > > --
>
> > > > > You received this message because you are subscribed to the Google
> > Groups
>
> > > > "CommunityEngine" group.> To post to this group, send email to
> > [email protected].
> > > > > To unsubscribe from this group, send email to
>
> > > > [email protected]<communityengine%2Bunsubscribe@
> > > > googlegroups.com>
> > <communityengine%2Bunsubscribe@ googlegroups.com>
> > > > .> For more options, visit this group at
>
> > > >http://groups.google.com/group/communityengine?hl=en.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "CommunityEngine" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<communityengine%2Bunsubscribe@
> > googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/communityengine?hl=en.
--
You received this message because you are subscribed to the Google Groups
"CommunityEngine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/communityengine?hl=en.