thecore_auth_commons 3.0.5 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/migrate/20160208110805_devise_create_users.rb +3 -3
- data/db/migrate/20160209152753_add_trackable_to_user.rb +5 -5
- data/db/migrate/20160209153229_add_admin_to_user.rb +1 -1
- data/db/migrate/20160209153326_add_lock_version_to_user.rb +1 -1
- data/db/migrate/20160209153406_add_locked_to_user.rb +1 -1
- data/db/migrate/20160209153533_add_access_token_to_user.rb +1 -1
- data/db/migrate/20160209153811_create_roles.rb +2 -2
- data/db/migrate/20160209153813_create_role_users.rb +1 -1
- data/db/migrate/20160209153816_create_permissions_chain.rb +9 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b1e66ae2f5c7db756eb318d707b5b876f9fcebe16f63b8026dc4da70ef61df9
|
4
|
+
data.tar.gz: ad094777a2932128c522f0ec3a17d53e956dd501c88f4564c9fa9d4b34bdff99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29cc422294cf41c00c2ac56f9184cf3170aa7d96b5681aa7ae16ac9ea988f0d0710f7995a123435582493c05bb1ae5bfef9d750b61b4b76272b2b0c212c06a5d
|
7
|
+
data.tar.gz: 1f8672bbf766fa896c8fe7b551830d9f5babc26c3626269e1cd74a9ff4b37aa282f88c0e58366db7df049947a449de7d8031698a9c64de0241ef138850bdc0e7
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
class DeviseCreateUsers < ActiveRecord::Migration[7.0]
|
4
4
|
def change
|
5
|
-
create_table :users do |t|
|
5
|
+
create_table :users, if_not_exists: true do |t|
|
6
6
|
## Database authenticatable
|
7
7
|
t.string :email, null: false, default: ""
|
8
8
|
t.string :encrypted_password, null: false, default: ""
|
@@ -36,8 +36,8 @@ class DeviseCreateUsers < ActiveRecord::Migration[7.0]
|
|
36
36
|
t.timestamps null: false
|
37
37
|
end
|
38
38
|
|
39
|
-
add_index :users, :email, unique: true
|
40
|
-
add_index :users, :reset_password_token, unique: true
|
39
|
+
add_index :users, :email, unique: true, if_not_exists: true
|
40
|
+
add_index :users, :reset_password_token, unique: true, if_not_exists: true
|
41
41
|
# add_index :users, :confirmation_token, unique: true
|
42
42
|
# add_index :users, :unlock_token, unique: true
|
43
43
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
class AddTrackableToUser < ActiveRecord::Migration[7.0]
|
2
2
|
def change
|
3
|
-
add_column :users, :sign_in_count, :bigint, default: 0, null: false
|
4
|
-
add_column :users, :current_sign_in_at, :datetime
|
5
|
-
add_column :users, :last_sign_in_at, :datetime
|
6
|
-
add_column :users, :current_sign_in_ip, :string
|
7
|
-
add_column :users, :last_sign_in_ip, :string
|
3
|
+
add_column :users, :sign_in_count, :bigint, default: 0, null: false, if_not_exists: true
|
4
|
+
add_column :users, :current_sign_in_at, :datetime, if_not_exists: true
|
5
|
+
add_column :users, :last_sign_in_at, :datetime, if_not_exists: true
|
6
|
+
add_column :users, :current_sign_in_ip, :string, if_not_exists: true
|
7
|
+
add_column :users, :last_sign_in_ip, :string, if_not_exists: true
|
8
8
|
end
|
9
9
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
class CreateRoles < ActiveRecord::Migration[7.0]
|
2
2
|
def change
|
3
|
-
create_table :roles do |t|
|
3
|
+
create_table :roles, if_not_exists: true do |t|
|
4
4
|
t.string :name
|
5
5
|
t.bigint :lock_version
|
6
6
|
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :roles, :name, unique: true
|
9
|
+
add_index :roles, :name, unique: true, if_not_exists: true
|
10
10
|
end
|
11
11
|
end
|
@@ -1,33 +1,33 @@
|
|
1
|
-
class CreatePermissionsChain < ActiveRecord::Migration[
|
1
|
+
class CreatePermissionsChain < ActiveRecord::Migration[7.0]
|
2
2
|
def change
|
3
3
|
# Predicates
|
4
|
-
create_table :predicates do |t|
|
4
|
+
create_table :predicates, if_not_exists: true do |t|
|
5
5
|
t.string :name
|
6
6
|
t.bigint :lock_version
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
add_index :predicates, :name, unique: true
|
10
|
+
add_index :predicates, :name, unique: true, if_not_exists: true
|
11
11
|
|
12
12
|
# Actions
|
13
|
-
create_table :actions do |t|
|
13
|
+
create_table :actions, if_not_exists: true do |t|
|
14
14
|
t.string :name
|
15
15
|
t.bigint :lock_version
|
16
16
|
|
17
17
|
t.timestamps
|
18
18
|
end
|
19
|
-
add_index :actions, :name, unique: true
|
19
|
+
add_index :actions, :name, unique: true, if_not_exists: true
|
20
20
|
|
21
21
|
# Targets
|
22
|
-
create_table :targets do |t|
|
22
|
+
create_table :targets, if_not_exists: true do |t|
|
23
23
|
t.string :name
|
24
24
|
t.bigint :lock_version
|
25
25
|
|
26
26
|
t.timestamps
|
27
27
|
end
|
28
|
-
add_index :targets, :name, unique: true
|
28
|
+
add_index :targets, :name, unique: true, if_not_exists: true
|
29
29
|
|
30
|
-
create_table :permissions do |t|
|
30
|
+
create_table :permissions, if_not_exists: true do |t|
|
31
31
|
t.references :predicate, null: false, foreign_key: true
|
32
32
|
t.references :action, null: false, foreign_key: true
|
33
33
|
t.references :target, null: false, foreign_key: true
|
@@ -36,7 +36,7 @@ class CreatePermissionsChain < ActiveRecord::Migration[6.0]
|
|
36
36
|
t.timestamps
|
37
37
|
end
|
38
38
|
# Association table
|
39
|
-
create_table :permission_roles do |t|
|
39
|
+
create_table :permission_roles, if_not_exists: true do |t|
|
40
40
|
t.references :role, null: false, foreign_key: true
|
41
41
|
t.references :permission, null: false, foreign_key: true
|
42
42
|
t.bigint :lock_version
|