From 5972ec6b9f38901bac6d34d923333fa09b7a1eac Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Sun, 13 Aug 2006 06:41:59 +0000 Subject: [PATCH] Populate the accounts and recurring_items tables. Added a shortterm column to account. --- db/migrate/002_create_recurring_items.rb | 8 ++++++++ db/migrate/004_create_accounts.rb | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/db/migrate/002_create_recurring_items.rb b/db/migrate/002_create_recurring_items.rb index e1c51cc..6e3cf71 100644 --- a/db/migrate/002_create_recurring_items.rb +++ b/db/migrate/002_create_recurring_items.rb @@ -11,6 +11,14 @@ class CreateRecurringItems < ActiveRecord::Migration t.column :created_on, :timestamp t.column :updated_on, :timestamp end + + RecurringItem.create :description => "Pers lön", :amount => "22200", + :startdate => Date.civil(2006, 8, 25), + :schedule_id => Schedule.find_by_name("Månad").id + + RecurringItem.create :description => "Telia", :amount => "-1200", + :startdate => Date.civil(2006, 9, 10), + :schedule_id => Schedule.find_by_name("Kvartal").id end def self.down diff --git a/db/migrate/004_create_accounts.rb b/db/migrate/004_create_accounts.rb index 7bf1321..8e7ad11 100644 --- a/db/migrate/004_create_accounts.rb +++ b/db/migrate/004_create_accounts.rb @@ -3,7 +3,17 @@ class CreateAccounts < ActiveRecord::Migration create_table (:accounts, :options => 'ENGINE=InnoDB DEFAULT CHARSET=utf8') do |t| t.column :name, :string + t.column :shortterm, :boolean end + + Account.create :name => "Pers lönekonto", :shortterm => true + Account.create :name => "Pers VISA-kort", :shortterm => true + Account.create :name => "Pers transkonto", :shortterm => true + Account.create :name => "ICA kundkort", :shortterm => true + Account.create :name => "Kristinas lönekonto", :shortterm => true + Account.create :name => "Pers aktiefond (Banco)", :shortterm => false + Account.create :name => "Pers kapitalförsäkring", :shortterm => false + end def self.down -- GitLab