diff options
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/001_create_database.rb | 19 | ||||
| -rw-r--r-- | db/migrations/001_create_users.rb | 10 |
2 files changed, 19 insertions, 10 deletions
diff --git a/db/migrations/001_create_database.rb b/db/migrations/001_create_database.rb new file mode 100644 index 00000000..9e374de2 --- /dev/null +++ b/db/migrations/001_create_database.rb @@ -0,0 +1,19 @@ +class CreateDatabase < ActiveRecord::Migration + def change + create_table :users do |t| + t.string :login + t.string :password + t.string :name + t.string :address + t.decimal :credit, :precision => 10, :scale => 2 + t.string :logo + end + + create_table :transactions do |t| + t.string :address + t.decimal :amount, :precision => 10, :scale => 2 + t.decimal :exchange, :precision => 10, :scale => 2 + t.timestamps + end + end +end diff --git a/db/migrations/001_create_users.rb b/db/migrations/001_create_users.rb deleted file mode 100644 index 4225589d..00000000 --- a/db/migrations/001_create_users.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateUsers < ActiveRecord::Migration - def change - create_table :users do |t| - t.string :name - t.string :address - t.decimal :credit, :precision => 10, :scale => 2 - t.string :logo - end - end -end |
