Skip to content
Snippets Groups Projects
Commit 5972ec6b authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Populate the accounts and recurring_items tables. Added a shortterm column

to account.
parent b4d7910e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment