Add FinancialLinks
For now this is only usefull for plugins, since there is no UI.
This commit is contained in:
parent
75deec9f06
commit
53bb096046
12 changed files with 95 additions and 7 deletions
10
db/migrate/20171002000000_create_financial_links.rb
Normal file
10
db/migrate/20171002000000_create_financial_links.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
class CreateFinancialLinks < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :financial_links do |t|
|
||||
t.text :note
|
||||
end
|
||||
|
||||
add_column :financial_transactions, :financial_link_id, :integer, index: true
|
||||
add_column :invoices, :financial_link_id, :integer, index: true
|
||||
end
|
||||
end
|
||||
18
db/schema.rb
18
db/schema.rb
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20171001020000) do
|
||||
ActiveRecord::Schema.define(version: 20171002000000) do
|
||||
|
||||
create_table "article_categories", force: :cascade do |t|
|
||||
t.string "name", limit: 255, default: "", null: false
|
||||
|
|
@ -85,12 +85,17 @@ ActiveRecord::Schema.define(version: 20171001020000) do
|
|||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "financial_link", force: :cascade do |t|
|
||||
t.text "note"
|
||||
end
|
||||
|
||||
create_table "financial_transactions", force: :cascade do |t|
|
||||
t.integer "ordergroup_id", limit: 4, default: 0, null: false
|
||||
t.decimal "amount", precision: 8, scale: 2, default: 0, null: false
|
||||
t.text "note", limit: 65535, null: false
|
||||
t.integer "user_id", limit: 4, default: 0, null: false
|
||||
t.datetime "created_on", null: false
|
||||
t.integer "ordergroup_id", limit: 4, default: 0, null: false
|
||||
t.decimal "amount", precision: 8, scale: 2, default: 0, null: false
|
||||
t.text "note", limit: 65535, null: false
|
||||
t.integer "user_id", limit: 4, default: 0, null: false
|
||||
t.datetime "created_on", null: false
|
||||
t.integer "financial_link_id"
|
||||
end
|
||||
|
||||
add_index "financial_transactions", ["ordergroup_id"], name: "index_financial_transactions_on_ordergroup_id", using: :btree
|
||||
|
|
@ -180,6 +185,7 @@ ActiveRecord::Schema.define(version: 20171001020000) do
|
|||
t.integer "created_by_user_id"
|
||||
t.string "attachment_mime"
|
||||
t.binary "attachment_data"
|
||||
t.integer "financial_link_id"
|
||||
end
|
||||
|
||||
add_index "invoices", ["supplier_id"], name: "index_invoices_on_supplier_id", using: :btree
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue