Skip to content

Commit

Permalink
add new model
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Mar 1, 2024
1 parent b1816ec commit 5e091ca
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/models/auth_user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class AuthUser < ApplicationRecord
end
11 changes: 11 additions & 0 deletions db/migrate/20240301124103_create_auth_users.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class CreateAuthUsers < ActiveRecord::Migration[7.0]
def change
create_table :auth_users do |t|
t.string :uid
t.string :email

t.timestamps
end
add_index :auth_users, :uid, unique: true
end
end
10 changes: 9 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2024_02_29_093827) do
ActiveRecord::Schema[7.0].define(version: 2024_03_01_124103) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

Expand Down Expand Up @@ -41,6 +41,14 @@
t.index ["person_id"], name: "index_advanced_trainings_on_person_id"
end

create_table "auth_users", force: :cascade do |t|
t.string "uid"
t.string "email"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["uid"], name: "index_auth_users_on_uid", unique: true
end

create_table "branch_adresses", force: :cascade do |t|
t.string "short_name"
t.string "adress_information"
Expand Down
5 changes: 5 additions & 0 deletions spec/models/auth_user_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'rails_helper'

RSpec.describe AuthUser, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

0 comments on commit 5e091ca

Please sign in to comment.