On Mon, Jul 20, 2009 at 10:10 PM, Ashley <[email protected]> wrote: > On Jul 20, 2009, at 7:52 PM, fREW Schmidt wrote: > >> Very interesting! How did you generate the table structure for the SQLite >> database? >> > > Check out http://search.cpan.org/perldoc?DBIx::Class::Manual::Cookbook and > any mention of the method "deploy" in the docs and list archive. > DBIC::Schema will try to deploy your database (perhaps just from classes) > anywhere you define. SQLite rules for this and allows, for example, > destructive or dangerous tests: deleting users, creating orders, etc to be > run against a real test DB and not just mocked. > > I'm writing a series of articles about different models in Catalyst. > Tomorrow's, coincidentally, is the first in DBIC and does this deployment > thing but not for tests, for creating a tracking database for a web app from > a schema. This will be the link when it's live sometime tomorrow (I haven't > picked a time for this one because I'm cleaning it up still but I've been > doing them around midnight) -- Catalyst Model #7: Page view counter/tracker > | http://sedition.com/a/2740 -- it will get a "410: Gone" until its > publish time rolls around tonight/tomorrow. The example code may be > confusing because it's wrapped in some Catalyst, the db auto-deploys from a > controller if it's not found on the first try to use it. > > Still, I think deploy is a really hot feature and I'm so glad it's become > more mature/stable lately along with the pieces it relies on like > SQL::Translator; the folks who work on those rule. Check out > DBIx::Class::Fixtures too. Chocolate and peanut-butter. >
Interesting. I assumed that might be how you pull it off. Our models don't have any column type information, but I doubt that will be an issue since everything in SQLite is just TEXT or BLOB or whatever. One last question. Did you dump the SQL statements with perl or MySQL? -- fREW Schmidt http://blog.afoolishmanifesto.com
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
