Initial commit

This commit is contained in:
Yaser
2026-08-13 19:50:53 +03:30
commit 38084458fe
879 changed files with 95198 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# encoding: UTF-8
# frozen_string_literal: true
class CreateMarkets < ActiveRecord::Migration[4.2]
def change
create_table :markets do |t|
t.string :ask_unit, null: false, limit: 5, index: true
t.string :bid_unit, null: false, limit: 5, index: true
t.decimal :ask_fee, null: false, default: 0, precision: 7, scale: 6
t.decimal :bid_fee, null: false, default: 0, precision: 7, scale: 6
t.integer :ask_precision, null: false, limit: 1, default: 4
t.integer :bid_precision, null: false, limit: 1, default: 4
t.integer :position, null: false, default: 0, index: true
t.boolean :visible, null: false, default: true, index: true
t.timestamps null: false
end
change_column :markets, :id, :string, limit: 10
add_index :markets, %i[ ask_unit bid_unit ], unique: true
end
end