diff --git a/app/models/account.rb b/app/models/account.rb new file mode 100644 index 0000000..20515d2 --- /dev/null +++ b/app/models/account.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +class Account < ApplicationRecord +end diff --git a/db/migrate/20181202020031_create_accounts.rb b/db/migrate/20181202020031_create_accounts.rb new file mode 100644 index 0000000..7f6b1a1 --- /dev/null +++ b/db/migrate/20181202020031_create_accounts.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class CreateAccounts < ActiveRecord::Migration[5.2] + def change + create_table :accounts do |t| + t.timestamps null: false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 3b3df20..2bc711b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,11 +10,16 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2018_12_01_184444) do +ActiveRecord::Schema.define(version: 2018_12_02_020031) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" + create_table "accounts", force: :cascade do |t| + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "active_storage_attachments", force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false diff --git a/factories/accounts.rb b/factories/accounts.rb new file mode 100644 index 0000000..53652bb --- /dev/null +++ b/factories/accounts.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :account do + end +end diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb new file mode 100644 index 0000000..0013f5a --- /dev/null +++ b/spec/models/account_spec.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe Account do + subject { create :account } + + pending "add some examples to (or delete) #{__FILE__}" +end