[Dbix-class] Local DB Mirror

fREW Schmidt frioux at gmail.com
Tue Jul 21 02:52:37 GMT 2009


Very interesting!  How did you generate the table structure for the SQLite
database?

On Mon, Jul 20, 2009 at 9:26 PM, Ashley <apv at sedition.com> wrote:

> On Jul 20, 2009, at 7:07 PM, fREW Schmidt wrote:
>
>> I was thinking it would be cool to do more local development, and the on=
ly
>> thing tethering me to the VPN is our database server (SQL Server,)
>> fortunately for this plan the only really special thing I do in the data=
base
>> is FK constraints and maybe a few non-standard defaults (now() etc.)  Bu=
t I
>> think for the most part that stuff will be fine to ignore for non-local
>> development.  Anyway, does anyone have any idea how I could use DBIC to
>> mirror a server into an sqlite database?  Thanks!
>>
>
> You should be able to mirror the data into SQLite pretty easily with SQL
> tools. SQLite doesn't care about column contents so it would happily load
> anything, I think. WRT the DBIC compatibility, I was playing with code fo=
r a
> shim for this between MySQL last week. I didn't have much time to do
> anything fancy but I did have some success; don't have it in front of me
> though.
>
> The thrust of it is you can define functions in SQLite via the wonderful
> DBD::SQLite engine so you just go through and define the compatibility le=
vel
> functions like "NOW()" which was the one I did to see if it would work. I
> was toying with releasing it to the CPAN as a skeleton with the hopes of
> getting contributions from everyone to build it out so that you could use
> schema->deploy( SQLite ) with code that does functions etc from PostgreSQL
> or MySQL or...
>
> http://search.cpan.org/dist/DBD-SQLite/lib/DBD/SQLite.pm
>
> Look at these:
>  # $dbh->sqlite_create_function( $name, $argc, $code_ref )
>  # $dbh->sqlite_create_collation( $name, $code_ref )
>  # $dbh->sqlite_create_aggregate( $name, $argc, $pkg )
>
> -Ashley
>
> _______________________________________________
> 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/dbix-class@lists.scsys.co.uk
>



-- =

fREW Schmidt
http://blog.afoolishmanifesto.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20090720/c96=
bec0c/attachment.htm


More information about the DBIx-Class mailing list