DBIx::C...:install(3)

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

✨ NAME ✨

DBIx::Class::Migration::Script::Help::install β€” the one that installs a migration version, bestie πŸ’… (yes that's the whole manual name, DBIx::C...:install(3), in case you were wondering 🫢)

🌸 SYNOPSIS 🌸

dbic-migration install --schema_class MyApp::Schema --to_version 2

That's it, that's the vibe. ✨

πŸ’– DESCRIPTION πŸ’–

Okay so install takes a migration you already prepared (prep is a whole other episode) and installs it into your database. Which version does it install? Either the current Schema class version, or the target version you point at with to_version. Slay. πŸ‘‘

Where does it go? To the database you connected through dsn, username in DBIx::Class::Migration::Script, and password in DBIx::Class::Migration::Script β€” or, if you're in dev mode, to a developer level sandbox as defined by sandbox_class in DBIx::Class::Migration::Script. Either way, she's going somewhere nice. πŸ¦‹

⚠️ Important, fr fr: you can't install to a database if the tables already exist. Not a drill. If the tables are already there, look at drop_tables first β€” no cap. πŸ’€

πŸŽ€ OPTIONS πŸŽ€

This command accepts the following options, and here's the little summary. You may learn more about each option by typing dbic-migration help OPTION. (Yes, per-option help. Iconic behaviour honestly. πŸ”₯)

includes (I,lib,libs,include)

Optional.

Adds the listed paths to @INC. Super handy during development when you want to use a development schema class. 🧚

to_version

aliases: V, Optional

This is the target version of the database we're installing. The version you name must have been previously prepared β€” no sneaky unprepared versions, bestie. If you don't specify it, we'll use the current Schema class version. ✨

schema_class (S)

Accepts Str. Required.

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.

🚨 If the schema_class cannot be loaded, a hard exception will be thrown. Like, a hard one. Not cute, just so you know. 😭

target_dir (D)

Optional.

When you're 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)

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. βš”οΈ

user

Aliases: U

password

Aliases: P

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 = sandbox time. 🏝️

dbic_fixture_class

Accepts: String to a Perl Class. Defaults to DBIx::Class::Fixtures

Lets you specify a fixture class. πŸ“

dbic_fixtures_extra_args

Accepts: HashRef. Optional

Allows you to pass custom arguments to DBIx::Class::Fixtures.

dbic_connect_attrs

dbi_connect_attrs

Accepts: HashRef, Optional

Lets you send custom attributes at connect time to either DBIx::Class or the underlying DBI and your storage DBD. Fancy. πŸ’…


🌈 SEE ALSO 🌈

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

πŸ‘‘ AUTHOR πŸ‘‘

See DBIx::Class::Migration for author information. (Go read it, iykyk 🫢)

See DBIx::Class::Migration for copyright and license information.


okay that's the whole page, you ate that πŸŽ€βœ¨ β€” this lil masterpiece is from perl v5.42.0, dated 2020-06-03, and it's the DBIx::C...:install(3) page, mwah πŸ’‹

πŸ“¦ where this page comes from