diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-03-23 15:57:09 -0700 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-03-23 15:57:09 -0700 |
| commit | 00c7f6129f87d77788aa92e08dd77b7b473f9a71 (patch) | |
| tree | 476e7f456fb3138d17927ce0ff3fea7b1a8f0060 /add_some_data.pl | |
| parent | 1cc8609a5976d3f394ac0f36fd1322ee8e6e4eea (diff) | |
moved things around
Diffstat (limited to 'add_some_data.pl')
| -rwxr-xr-x | add_some_data.pl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/add_some_data.pl b/add_some_data.pl index 3362d11..01c574b 100755 --- a/add_some_data.pl +++ b/add_some_data.pl @@ -23,15 +23,16 @@ my $entry3 = { date => DateTime->now()->epoch, }; #our $schema = JournalApp::Schema->connect( 'dbi:SQLite:./journals.db', '', ''); -our $schema = JournalApp::Schema->connect( 'dbi:mysql:database=journal;host=localhost;port=3306', 'journal_user', 'journal_password', { +our $schema = JournalApp::Schema->connect( 'dbi:mysql:database=journal;host=localhost;port=3306', + 'journal_user', + 'journal_password', { quote_names => 1 }); sub test_remove_from_db{ #delete by id my $journalentry = $schema->resultset('Journal')->find({ id => $entry->{id} }); - -$journalentry->delete(); + $journalentry->delete(); } @@ -59,8 +60,6 @@ sub test_add_journal_entry{ return $journalentry; } -#how do I connect? - sub main{ test_add_journal_entry $entry1; test_add_journal_entry $entry2; |
