Trying to restart from scratch
Added by Wolfgang Engelen over 12 years ago
Hi guys,
I was wondering if anybody knows how to restart a DB from scratch after having played around with RM. It seems I can't really get my head around ActiveRecord... I have tried the following ideas:
- Drop the database: Yields problems to recreate as any rake db:.. task seems to be looking for redmine.users
- Using db:drop db:reset db:migrate generate_secret_token, seems to leave me with a clean DB but after runing redmine:load_default_data I don't have users available. (my best guess has been that ActiveRecord is playing tricks on me)
- I've also tried removing everything from the db folder, which then creates errors.
So I wonder, am I missing a step?
I figure I can just add the admin right into the users table, yet I leaves the question of whether all other things are being loaded or not.
I'm running on Windows 2008, MySQL 5.1, RM 2.1.2, Ruby193, RAils 3.2.8. I've also installed a number of plugins, and ran a db:plugins:migrate VERSION=0 on all of them, then ran a plain db:plugins:migrate.
I would appreciate any advice, I reckon this is probably better suited for a rails forum, yet having the RM context here helps, as the load_default_data is specific to it.
I apologize in advance for the noobie nature of my question.
Wolf
Replies (1)
RE: Trying to restart from scratch
-
Added by Jan Niggemann (redmine.org team member) over 12 years ago
You should be able to just drop the database, re-create it and then rake db:migrate RAILS_ENV=production
to initialize values...