DBICADMIN(1p)
π DBICADMIN π
okay bestie, gather round, because today we're talking about dbicadmin β the utility for administrating DBIx::Class schemata. yes, that's really what it's called, and yes it's lowkey iconic. this is a perl manual page from the User Contributed Perl Documentation section, so you know it's giving real ones only. π
β¨ SYNOPSIS β¨
the vibe is:
dbicadmin: [-I] [long options...]
and here's what that actually looks like when you're doing the thing π«Ά
deploy a schema to a database
dbicadmin --schema=MyApp::Schema \
--connect='["dbi:SQLite:my.db", "", ""]' \
--deploy
update an existing record
dbicadmin --schema=MyApp::Schema --class=Employee \
--connect='["dbi:SQLite:my.db", "", ""]' \
--op=update --set='{ "name": "New_Employee" }'
see? not scary. we move. π¦
πΈ OPTIONS πΈ
π Actions
these are the what do you want to do buttons, bestie. pick your fighter.
--createβ create version diffs. heads up though: it needspreversion. no preversion, no diff, periodt.--upgradeβ upgrade the database so it matches the current schema. glow-up but for your tables. β¨--installβ install the schema version tables into a database that already exists.--deployβ deploy the schema to the database. the big one. main character energy. π--selectβ select data from the schema.--insertβ insert data into the schema.--updateβ update data in the schema.--deleteβ delete data from the schema. (rip to that row fr π)--opβ the compatibility option: literally all of the actions above can be handed over as--op=<action>. so instead of--updateyou can say--op=updateand it's the same thing. iykyk.--helpβ display this help. the classic. when in doubt, ask for help, bestie. π
π§ Arguments
the details. the lore. the little knobs and dials.
--config-fileor--configβ supply the config file, which gets parsed byConfig::Any.--connect-infoβ supply the connect info as trailing options, like this:--connect-info dsn=<dsn> user=<user> password=<pass>--connectβ supply the connect info as a JSON-encoded structure, e.g.--connect=["dsn","user","pass"]--schema-classβ the class of the schema you want to load.--config-stanzaβ where in the config to find theconnection_info. supply it in the formMyApp::Model::DB.--resultsetor--resultset-classor--classβ the resultset to operate on for data manipulation. three names, one icon. π--sql-dirβ the directory where sql diffs will be created.--sql-typeβ the RDBMs flavour you wish to use. pick your flavour bestie π--versionβ supply a version install.--preversionβ the previous version to diff against. (remember--createwants this one!)--setβ JSON data used to perform data operations.--attrsβ JSON string to be used for the second argument for search.--whereβ JSON string to be used for the where clause of search.--forceβ be forceful with some operations. π€ use with care, she's loud.--traceβ turn onDBIx::Classtrace output. for when you need to see everything.--quietβ be less verbose. shhh. π€«-Iβ same as perl's-I, prepended to current@INC.
π AUTHORS π
see "AUTHORS" in DBIx::Class. the originators. the founders. we stan. π«Ά
β LICENSE β
you may distribute this code under the same terms as Perl itself. slay, honestly.
π real talk bestie: this page came fromperlv5.40.0, dated2025-02-01, and it's filed underDBICADMIN(1p). go forth and administer those schemata. no cap. β¨ππ
π¦ where this page comes from
- debian trixie: libdbix-class-perl 0.082844-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdbix-class-perl 0.082844-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdbix-class-perl 0.082844-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms