DBIx::C...ox_class(3)

πŸ“¦ version 0.075, in opensuse-leap 16.0

πŸ’… DBIx::Class::Migration::Script::Help::sandbox_class(3)

okay so bestie, you found the page for DBIx::Class::Migration::Script::Help::sandbox_class β€” and yes, it's from the User Contributed Perl Documentation collection, but honestly it's just a lil help page for one single option and it's lowkey adorable. let's get into it πŸŽ€


✨ NAME ✨

DBIx::Class::Migration::Script::Help::sandbox_class

that's it. that's the name. main character module energy, no cap. πŸ‘‘


🌸 SYNOPSIS 🌸

dbic-migration install --schema_class MyApp::Schema --sandbox_class MySQLSandbox

see how easy that is? one flag, one vibe change, done. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first things first, the boring-but-important bits:

πŸŽ€ Aliases

  • T
  • sb

you can call it by its nickname, iykyk. it's giving "close friends only". πŸ’…

πŸ“ Value

  • String (default: SqliteSandbox)

so here's the whole situation, bestie: if you don't have a target database for your migrations β€” like, maybe you're just doing dev stuff, or you're in that initial prototyping era where nothing is real yet β€” we automatically create a local database sandbox in your target_dir in DBIx::Class::Migration::Script. it's automatic. we got you. 🫢

by default this sandbox is a file based DBD::Sqlite database, and ngl that's the easy option since chances are good this is already installed on your development computer. and if it's not? it is trivial to install. literally trivial. 😌

you can change this to either PostgresqlSandbox or MySQLSandbox, which will create a sandbox using either DBIx::Class::Migration::MySQLSandbox or DBIx::Class::Migration::PostgresqlSandbox β€” and those in turn require the separate installation of either Test::mysqld or Test::Postgresql58. so like, yes bestie you can upgrade the vibe, but you gotta install the extra stuff first. the way that extra dependency sneaks up on you 😭

like some of the other option flags, you can specify this with an %ENV setting:

export DBIC_MIGRATION_SANDBOX_CLASS=MySQLSandbox

environment variable, set it, forget it, slay. 🌈

the default sqlite sandbox is documented at DBIx::Class::Migration::SQLiteSandbox, although this single file database is pretty straightforward to use. like, it's a whole documented module but honestly it's not that deep. πŸ’–

heads up bestie: if you go the PostgresqlSandbox or MySQLSandbox route, don't forget those separate Test::mysqld / Test::Postgresql58 installs β€” the sandbox won't happen without them. πŸ”₯

⭐ SEE ALSO ⭐

go read these too, they're iconic:

  • DBIx::Class::Migration
  • DBIx::Class::Migration::Script
  • DBIx::Class::Migration::Features
  • DBIx::Class::Migration::Tutorial

πŸ‘‘ AUTHOR πŸ‘‘

See DBIx::Class::Migration for author information. (go look, bestie, it's all over there 🫢)


See DBIx::Class::Migration for copyright and license information. (same deal, it lives over there ✨)


and that's the page, bestie! 🌸 this one shipped as perl v5.42.0 and was dated 2020-06-03 β€” so like, vintage but still cute. mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from