Beam::Make::DBI::Schema - A Beam::Make recipe to build database schemas
version 0.003
### container.yml # A Beam::Wire container to configure a database connection to use sqlite: $class: DBI $method: connect $args: - dbi:SQLite:conversion.db ### Beamfile conversion.db: $class: Beam::Wire::DBI::Schema dbh: { $ref: 'container.yml:sqlite' } schema: - table: accounts columns: - account_id: VARCHAR(255) NOT NULL PRIMARY KEY - address: TEXT NOT NULL
This Beam::Make recipe class builds a database schema.
Required. The DBI database handle to use. Can be a reference to a service in a Beam::Wire container using { $ref: "<container>:<service>" }.
{ $ref: "<container>:<service>" }
A list of tables to create. Each table is a mapping with the following keys:
The name of the table to create.
A list of key/value pairs of columns. The key is the column name, the value is the SQL to use for the column definition.
Beam::Make, Beam::Wire, DBI
Doug Bell <preaction@cpan.org>
This software is copyright (c) 2020 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Beam::Make, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Beam::Make
CPAN shell
perl -MCPAN -e shell install Beam::Make
For more information on module installation, please visit the detailed CPAN module installation guide.