| 1 | package Games::Framework::RCP::Database::Result::VarReal; | ||
| 2 | |||
| 3 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 3 | our $VERSION = '0.22'; | |
| 7 | |||
| 8 | 3 | ▶ | use base qw/DBIx::Class/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 3 | __PACKAGE__->load_components(qw/UTF8Columns Core/); | |
| 11 | 3 | __PACKAGE__->table('vars_real'); | |
| 12 | 3 | __PACKAGE__->add_columns( | |
| 13 | id_variable => { | ||
| 14 | data_type => 'integer', | ||
| 15 | is_nullable => 0, | ||
| 16 | is_auto_increment => 1, | ||
| 17 | comments => 'ID of the variable.', | ||
| 18 | extra => {unsigned => 1}, | ||
| 19 | }, | ||
| 20 | name => { | ||
| 21 | data_type => 'varchar', | ||
| 22 | size => 64, | ||
| 23 | is_nullable => 0, | ||
| 24 | comments => 'Name of the variable.', | ||
| 25 | }, | ||
| 26 | value => { | ||
| 27 | data_type => 'real', | ||
| 28 | is_nullable => 0, | ||
| 29 | comments => 'Value of the variable.', | ||
| 30 | }, | ||
| 31 | ); | ||
| 32 | |||
| 33 | 3 | __PACKAGE__->utf8_columns(qw/name/); | |
| 34 | 3 | __PACKAGE__->set_primary_key('id_variable'); | |
| 35 | 3 | __PACKAGE__->add_unique_constraint(['name']); | |
| 36 | |||
| 37 | 2 | ▶ | sub sqlt_deploy_hook { |
|
Subroutine
sqlt_deploy_hook: called CC=1 SCAR=0.0
Pod
documented
| |||
| 38 | 2 | my ($self, $sqlt_table) = @_; | |
| 39 | |||
| 40 | 2 | $sqlt_table->options({ENGINE => 'InnoDB'}); | |
| 41 | 2 | $sqlt_table->options({CHARSET => 'UTF8'}); | |
| 42 | 2 | $sqlt_table->comments('List of real (double/float) variables.'); | |
| 43 | } | ||
| 44 | |||
| 45 | 3 | 1; | |
| 46 | |||
| 47 | __END__ | ||