DBIx::C...aLoader(3)

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

πŸ’– NAME πŸ’–

okay so bestie, meet DBIx::Class::Migration::RunScript::Trait::SchemaLoader β€” yes, say that five times fast, i dare you 😭 β€” and its whole tagline is β€œGive your Run Script a Schema.” iconic.

✨ SYNOPSIS ✨

here's the group-chat recap: you use the run script thing, then call builder with 'SchemaLoader' and a sub. that sub shifts, grabs schema, hits the Country resultset, and populates it. no cap, it's giving database setup:

use DBIx::Class::Migration::RunScript;

builder {
  'SchemaLoader',
  sub {
    shift->schema->resultset('Country')
      ->populate([
      ['code'],
      ['bel'],
      ['deu'],
      ['fra'],
    ]);
  };
};

🌸 DESCRIPTION 🌸

This is a Moo::Role that adds a schema attribute to your DBIx::Class::Migration::RunScript. and the schema? it's generated via DBIx::Class::Schema::Loader, so it stays consistent to your actual deployed database structure. not dependent on your actual code β€” that's the whole point, bestie. πŸ’…

πŸŽ€ ATTRIBUTES πŸŽ€

This class defines the follow attributes (yes, β€œfollow” β€” we're keeping the typo, it's part of the lore):

schema

Using DBIx::Class::Schema::Loader create a DBIx::Class::Schema that represents the connected database. that's it. the attribute ate and left no crumbs. πŸ“

πŸ¦‹ SEE ALSO πŸ¦‹

  • DBIx::Class::Migration
  • DBIx::Class::Migration::RunScript

go read these when you're done, iykyk. ✨

πŸ’œ AUTHOR πŸ’œ

See DBIx::Class::Migration for author information.

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


cute sign-off: this page is from perl v5.42.0, dated 2020-06-03 πŸ’– periodt.

πŸ“¦ where this page comes from