
DataMapper should check the class name before migrating.
Reported by Postmodern | June 4th, 2010 @ 05:10 PM
I noticed that DataMapper will accept empty class-name when migrating:
require 'dm-core'
require 'dm-migrations'
model = Class.new
model.class_eval do
include DataMapper::Resource
include DataMapper::Migrations
property :id, Serial
end
DataMapper::Logger.new(STDOUT,:debug)
DataMapper.setup(:default, 'sqlite3:/tmp/test.db')
DataMapper.auto_migrate!
~ (0.000109) SELECT sqlite_version(*)
~ (0.000337) DROP TABLE IF EXISTS ""
~ (0.000053) PRAGMA table_info("")
~ (0.086799) CREATE TABLE "" ("id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT)
Comments and changes to this ticket
-
Dan Kubb (dkubb) June 6th, 2010 @ 12:09 AM
- State changed from new to resolved
(from [f2abc8826d5547468152c6c19983ff81eecdca43]) Test to make sure the model has a name when finalizing it
[#1303 state:resolved] http://github.com/datamapper/dm-core/commit/f2abc8826d5547468152c6c...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Tags
Referenced by
-
1303 DataMapper should check the class name before migrating. [#1303 state:resolved] http://github.com/datamapper/dm-c...