From d18b13bc64d66df89b2a37aacc8fca22a38dbb23 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 9 Feb 2011 20:48:21 +0100 Subject: Added new Schemas for alias, domain, log --- lib/Fripost/Schema/Result/Log.pm | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 lib/Fripost/Schema/Result/Log.pm (limited to 'lib/Fripost/Schema/Result/Log.pm') diff --git a/lib/Fripost/Schema/Result/Log.pm b/lib/Fripost/Schema/Result/Log.pm new file mode 100644 index 0000000..87fb8d9 --- /dev/null +++ b/lib/Fripost/Schema/Result/Log.pm @@ -0,0 +1,49 @@ +package Fripost::Schema::Result::Log; + +use 5.010_000; +use warnings; +use strict; + +use base qw/DBIx::Class::Core/; + +# mysql> describe log; +# +-------+-------------+------+-----+-------------------+----------------+ +# | Field | Type | Null | Key | Default | Extra | +# +-------+-------------+------+-----+-------------------+----------------+ +# | id | int(11) | NO | PRI | NULL | auto_increment | +# | user | varchar(20) | NO | | | | +# | event | text | NO | | NULL | | +# | date | timestamp | NO | | CURRENT_TIMESTAMP | | +# +-------+-------------+------+-----+-------------------+----------------+ +# 4 rows in set (0.00 sec) + +__PACKAGE__->load_components(qw/InflateColumn::DateTime/); + +__PACKAGE__->table('mailbox'); +__PACKAGE__->add_columns(qw/ id user event /); +__PACKAGE__->add_columns( + date => { data_type => 'datetime', timezone => "Europe/Stockholm", locale => "se_SV" }, +); + +__PACKAGE__->set_primary_key('id'); + +=head1 NAME + +Fripost::Schema::Result::Log - + +=head1 AUTHOR + +Stefan Kangas C<< >> + +=head1 COPYRIGHT + +Copyright 2010,2011 Stefan Kangas, all rights reserved. + +=head1 LICENSE + +This program is free software; you can redistribute it and/or modify it +under the same terms as perl itself. + +=cut + +1; # End of Log.pm -- cgit v1.2.3