mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Add accounts and activities
This commit is contained in:
parent
fb318e37cb
commit
b5521594ce
8 changed files with 170 additions and 1 deletions
15
db/migrate/20150410124724_create_accounts.rb
Normal file
15
db/migrate/20150410124724_create_accounts.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class CreateAccounts < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :accounts do |t|
|
||||
t.integer :registrar_id
|
||||
t.string :account_type
|
||||
t.decimal :balance
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
Registrar.all.each do |x|
|
||||
Account.create(registrar_id: x.id, account_type: Account::CASH)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue