DBIx::C...:install(3)
β¨ 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 π«Ά)
π COPYRIGHT & LICENSE π
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
- 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