|
|
For development there are seeds defined to create a database with some users, courses, etc. Whenever new features are added, the seeds should be updated accordingly.
|
|
|
## Production database
|
|
|
In production we use a MySQL database. Initializing the database can be done by running `bundle exec rake db:setup` on the server, which will also create an admin user account. See `/db/seeds/production/users.seeds.rb`.
|
|
|
|
|
|
### Creating the database
|
|
|
* `bundle exec rake db:setup` |
|
|
\ No newline at end of file |
|
|
## Development database
|
|
|
For development we use an SQLite database. There are seeds defined to initialize the database with some users, courses, etc. Seeds can be found in `/db/seeds/development/*.rb`. Whenever new features are added, the seeds should be updated accordingly.
|
|
|
|
|
|
#### Creating the database
|
|
|
`bundle exec rake db:setup`
|
|
|
|
|
|
#### Running migrations
|
|
|
`bundle exec rake db:migrate`
|
|
|
|
|
|
#### Deleting the database
|
|
|
`bundle exec rake db:drop`
|
|
|
|
|
|
## Test database
|
|
|
The tests use their own database, which is built from fixtures. All database entries are defined in `/test/fixtures/*.yml`. See http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html for more information on fixtures. |
|
|
\ No newline at end of file |