DBIx::C...f_needed(3)
π NAME
okay so, bestie, welcome to the User Contributed Perl Documentation page filed under DBIx::C...f_needed(3) β this whole thing is about DBIx::Class::Migration::Script::Help::install_if_needed, and its whole job is: install a migration only if needed. periodt π
β¨ SYNOPSIS
dbic-migration install_if_needed --schema_class MyApp::Schema
π¦ DESCRIPTION
So here's the vibe: this installs the database to the current $schema version if it is not currently installed. Otherwise? It's a nop β literally does nothing β even if the database is behind the schema. No cap, that's the whole behavior. π
π OPTIONS
This command accepts the following options. You may learn more about each option by typing dbic-migration help OPTION. The following is a summary. β¨
π includes (I, lib, libs, include)
includes(I,lib,libs,include) β Optional. Adds the listed paths to@INC. Handy during development when you want to use a development schema class.
β to_version
to_versionβ aliases:V; Optional. This is the target version of the database we are installing. The version named must be have been previously prepared. If not specified, we will use the current"Schema"class version.
π¦ schema_class (S)
schema_class(S) β AcceptsStr. Required. This is the schema we use as the basis for creating, managing and running your deployments. This should be the full package namespace defining your subclass ofDBIx::Class::Schema. For example"MyApp::Schema".
If the "schema_class" cannot be loaded, a hard exception will be thrown. π
πΈ target_dir (D)
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).
π sandbox_class
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.
π«Ά user
userβ Aliases:U.
π₯ password
passwordβ Aliases:P.
π dsn
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"inDBIx::Class::Migration::Script).
π dbic_fixture_class
dbic_fixture_classβ Accepts:Stringto a Perl Class. Defaults toDBIx::Class::Fixtures. Lets you specify a fixture class.
π§ dbic_fixtures_extra_args
dbic_fixtures_extra_argsβ Accepts:HashRef. Optional. Allows you to pass custom arguments toDBIx::Class::Fixtures.
π dbic_connect_attrs / dbi_connect_attrs
dbic_connect_attrs,dbi_connect_attrsβ Accepts:HashRef, Optional. Lets you send custom attributes at"connect"time to eitherDBIx::Classor the underlyingDBIand your storage"DBD".
π SEE ALSO
DBIx::Class::MigrationDBIx::Class::Migration::ScriptDBIx::Class::Migration::FeaturesDBIx::Class::Migration::Tutorial
π AUTHOR
See DBIx::Class::Migration for author information. π«Ά
π COPYRIGHT & LICENSE
See DBIx::Class::Migration for copyright and license information. β¨
π okay that's the whole page, bestie β sourced fromperl v5.42.0, dated2020-06-03, filed underDBIx::C...f_needed(3). Go slay your migrations! π π
π¦ 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