markbates / mack-more
- Source
- Commits
- Network (2)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
0178c47
dsutedja (author)
Tue Aug 12 11:22:41 -0700 2008
commit 0178c47330da90af4140cb2784227ff423664ce1
tree 6098933196a7f7d27f45fab80eed9980fa70a929
parent 0610674e5a4537030cd1a1230f37b038af4c2189
tree 6098933196a7f7d27f45fab80eed9980fa70a929
parent 0610674e5a4537030cd1a1230f37b038af4c2189
mack-more / mack-data_mapper
mack-data_mapper/README
This gem provides Mack integration with the ORM Framework, DataMapper. For more information on DataMapper please visit: http://www.datamapper.org == Notes The database.yml file for a DataMapper backed application would look something like this: # MySQL: development: default: adapter: mysql database: my_app_development host: localhost username: my_db_user password: password test: default: adapter: mysql database: my_app_test host: localhost username: my_db_user password: password production: default: adapter: mysql database: my_app_production host: localhost username: my_db_user password: password # PostgreSQL: development: default: adapter: postgres database: my_app_development host: localhost username: my_db_user password: password test: default: adapter: postgres database: my_app_test host: localhost username: my_db_user password: password production: default: adapter: postgres database: my_app_production host: localhost username: my_db_user password: password # SQLite3: development: default: adapter: sqlite3 database: db/my_app_development.db test: default: adapter: sqlite3 database: db/my_app_test.db production: default: adapter: sqlite3 database: db/my_app_production.db == Testing Tests are wrapped in a transaction so that any database activities get rolled back at the end of the test. This works with both RSpec and Test::Unit::TestCase == Rake tasks # Drops (if it exists) the database and then creates it for your environment. rake db:recreate # Creates the database for your environment. rake db:create # Drops the database for your environment. rake db:drop # Creates your test and development databases. Does NOT create your production database! rake db:create:all # Drops your test and development databases. Does NOT create your production database! rake db:drop:all # Drops and creates your test and development databases. Does NOT create your production database! rake db:recreate:all # Migrate the database through scripts in db/migrations. rake db:migrate # Rolls the schema back to the previous version. Specify the number of steps with STEP=n. rake db:rollback # Raises an error if there are pending migrations. rake db:abort_if_pending_migrations # Generates a controller, a model, a migration, and tests for the given resource. rake generate:scaffold # Generates a model, a migration, and a test for the given resource. rake generate:model # Generates a migration for the given columns rake generate:migration

