DBIx::C...e_schema(3)

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

✨ 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::Migration
  • DBIx::Class::Migration::Script
  • DBIx::Class::Migration::Features
  • DBIx::Class::Migration::Tutorial

🧚 AUTHOR 🧚

See DBIx::Class::Migration for author information. (go check it, iykyk πŸ¦‹)


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