DBIx::C...e_schema(3)
β¨ NAME β¨
ok so this is DBIx::Class::Migration::Script::Help::make_schema β the manual page (the DBIx::C...e_schema(3) situation, from the User Contributed Perl Documentation, bestie π
) that's all about reverse engineering a DBIC Schema. yes. that's the gig. π
πΈ SYNOPSIS πΈ
dbic-migration make_schema --user myapp \
--password $secret \
--dsn='DBI:SQLite:myapp.db'
look at that little command go π it's giving "actually works". π¦
π DESCRIPTION π
So what does this even do? It creates DBIC schema files from the currently deployed database, and drops them into your target directory. no cap. π«Ά
Why would you want that? Two whole reasons, and they're both extremely valid:
- You can use it to bootstrap your ORM β yes, from zero to schema, iconic behaviour, periodt π
- Or, if you get confused about what the deployment perl run files get for schema, this is your little answer. vibe check passed β¨
The classes are created in "$target_dir/dumped_db/..." β that's literally where they live, don't lose them π
π§ OPTIONS π§
This command accepts the following options. You may learn more about each option by typing dbic-migration help OPTION (yes, per-option help, we love a self-documenting situation π). The following is a summary.
π includes (I,lib,libs,include)
Optional.
This one adds the listed paths to @INC. Highkey handy during development when you want to use a development schema class. slay. π
π« schema_class (S)
Accepts String.
This is the schema we use as the basis for creating, managing and running your deployments. It should be the full package namespace defining your subclass of DBIx::Class::Schema. For example "MyApp::Schema".
β οΈ real talk: if the "schema_class" cannot be loaded, a hard exception will be thrown. like, thrown thrown. π not a gentle little warning, an actual exception. be aware.
π¦ target_dir (D)
Optional.
When using a "sandbox_class" for generating developer level database sandboxes, you may wish to place the sandbox in a directory other than the default (which is under the "share" directory off the project root). your sandbox, your rules π
π sandbox_class
Aliases: T, sb
Accepts: String (default: SqliteSandbox)
This is the class we use to create a developer level database sandbox.
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. pick your fighter, bestie π
π₯ user
Aliases: U
(that's the whole thing β it's a summary, remember? type dbic-migration help user for the lore β¨)
π password
Aliases: P
(same energy. go read the help for this one too π«Ά)
π dsn
Connection information to an already created and running instance of a database. If you don't specify this, we will assume you want a developer level sandbox (see "sandbox_class" in DBIx::Class::Migration::Script). so like β no dsn, no problem, you just get a sandbox. lowkey convenient ngl π
π SEE ALSO π
Go read these, fr fr, they're the whole ecosystem:
DBIx::Class::MigrationDBIx::Class::Migration::ScriptDBIx::Class::Migration::FeaturesDBIx::Class::Migration::Tutorial
π§ AUTHOR π§
See DBIx::Class::Migration for author information. (go check it, iykyk π¦)
π COPYRIGHT & LICENSE π
See DBIx::Class::Migration for copyright and license information. π
and that's the page!! tysm for reading, mwah π ok so the cute little sign-off: this gem of a doc shipped as perl v5.42.0, dated 2020-06-03, living its truth under DBIx::C...e_schema(3) in the User Contributed Perl Documentation. iconic, honestly. bye bestie, go make some schema π
β¨π·
π¦ 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