Basic donation records
Adds donation model/table and basic manual management in the admin panel, as well as basic listing of users' own donations.
This commit is contained in:
@@ -8,6 +8,7 @@ class CreateInvitations < ActiveRecord::Migration[6.0]
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :invitations, :user_id
|
||||
add_index :invitations, :invited_user_id
|
||||
end
|
||||
|
||||
15
db/migrate/20201217161544_create_donations.rb
Normal file
15
db/migrate/20201217161544_create_donations.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateDonations < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
create_table :donations do |t|
|
||||
t.integer :user_id
|
||||
t.integer :amount_sats
|
||||
t.integer :amount_eur
|
||||
t.integer :amount_usd
|
||||
t.string :public_name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :donations, :user_id
|
||||
end
|
||||
end
|
||||
13
db/schema.rb
13
db/schema.rb
@@ -10,7 +10,18 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2020_11_30_132533) do
|
||||
ActiveRecord::Schema.define(version: 2020_12_17_161544) do
|
||||
|
||||
create_table "donations", force: :cascade do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "amount_sats"
|
||||
t.integer "amount_eur"
|
||||
t.integer "amount_usd"
|
||||
t.string "public_name"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.index ["user_id"], name: "index_donations_on_user_id"
|
||||
end
|
||||
|
||||
create_table "invitations", force: :cascade do |t|
|
||||
t.string "token"
|
||||
|
||||
Reference in New Issue
Block a user