DBIx::C...eSandbox(3)
π NAME π
Welcome to the DBIx::C...eSandbox(3) page, bestie β it's a User Contributed Perl Documentation moment, and the actual module is DBIx::Class::Migration::SqliteSandbox.
DBIx::Class::Migration::SqliteSandbox β Autocreate a Sqlite sandbox. That's the name and the whole vibe. β¨
β¨ SYNOPSIS β¨
Okay so here's the code, copied exactly, no cap:
use DBIx::Class::Migration;
my $migration = DBIx::Class::Migration->new(
schema_class=>'Local::Schema',
db_sandbox_class=>'DBIx::Class::Migration::SqliteSandbox'),
$migration->prepare;
$migration->install;
Please note db_sandbox_class is a lazy built attribute, and it will default to DBIx::Class::Migration::SqliteSandbox. So yes, the default is doing main character energy. π
πΈ DESCRIPTION πΈ
In order to help you jumpstart your database design and deployment, by default we will automatically create a sqlite based file database in your target-dir. That's the little magic trick. πͺ
This is the default supported option as documented in DBIx::Class::Migration and in DBIx::Class::Migration::Tutorial. DBD::SQLite is useful for your initial development and for when you are trying to build quick prototypes but for production and more serious work I recommend you target a different database. (Dramatic but that's the tea.) You can use MySQL::Sandbox to make it easy to create local MySQL sandboxes for development, including replication clusters. For a more simple (and limited) approach you can also use DBIx::Class::Migration::MySQLSandbox or DBIx::Class::Migration::PgSandbox.
Nothing else is required to install in order to use this default option. Literally nothing extra, bestie. π«Ά
Since Sqlite is a simple, single file database that doesn't run persistently we don't create any helper scripts. If you want to access the database directly you can do so with the sqlite3 commandline tool which you should get when you get DBD::Sqlite. To access the sandbox database:
sqlite3 [target_dir]/[schema_class].db
For example, if your schema_class is MyApp::Schema and your sandbox is in the default share:
sqlite3 MyApp-Web/share/myapp-schema.db
You can also follow the tutorial DBIx::Class::Migration::Tutorial since the bulk of the tutorial uses the sqlite sandbox. Slay. π
π¦ SEE ALSO π¦
The SEE ALSO squad is literally: DBIx::Class::Migration, DBD::Sqlite. Go read those too, iykyk. π
π AUTHOR π
See DBIx::Class::Migration for author information. That's where the author receipts live. π
π COPYRIGHT & LICENSE π
See DBIx::Class::Migration for copyright and license information. All the legal-ish cute stuff is over there. β
Okay bye bestie! This page rode in with perl v5.42.0, dated 2020-06-03, and it's filed under DBIx::C...eSandbox(3). Mwah! π
π¦ where this page comes from
- opensuse-leap 16.0: perl-DBIx-Class-Migration 0.075-bp160.1.10 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms