I know it's possible to run extra DDL scripts with NHibernate. For example triggers or indexes. This feature is NHibernate is named "Auxiliary Database Objects".
Is it possible to do same thing in Castle ActiveRecord?
I know it's possible to run extra DDL scripts with NHibernate. For example triggers or indexes. This feature is NHibernate is named "Auxiliary Database Objects".
Is it possible to do same thing in Castle ActiveRecord?
ActiveRecordStarter.CreateSchemaFromFile("myscript1.sql");
(from http://www.castleproject.org/activerecord/documentation/trunk/usersguide/schemagen.html)
Just like Diego said, ActiveRecordStarter.CreateSchemaFromFile
is the way to do this.
If it doesn't execute anything, make sure your SQL script has its lines separated by ;
(or GO
). Even if you have a single line in your file, it has to end with ;