add timestamp to users roles table (#20844)
This commit is contained in:
parent
31c982abba
commit
ed837eb5b8
2 changed files with 8 additions and 1 deletions
|
|
@ -0,0 +1,5 @@
|
|||
class AddTimestampsToUsersRolesTable < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_timestamps :users_roles, default: -> { 'CURRENT_TIMESTAMP' }
|
||||
end
|
||||
end
|
||||
|
|
@ -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_03_06_173309) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2024_04_08_101038) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "citext"
|
||||
enable_extension "ltree"
|
||||
|
|
@ -1386,7 +1386,9 @@ ActiveRecord::Schema[7.0].define(version: 2024_03_06_173309) do
|
|||
end
|
||||
|
||||
create_table "users_roles", id: false, force: :cascade do |t|
|
||||
t.datetime "created_at", default: -> { "CURRENT_TIMESTAMP" }, null: false
|
||||
t.bigint "role_id"
|
||||
t.datetime "updated_at", default: -> { "CURRENT_TIMESTAMP" }, null: false
|
||||
t.bigint "user_id"
|
||||
t.index ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue