thecore_auth_commons 3.0.5 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e9c1cc8505cddf86bb6abc922c538a0d55fa571933b6158e078df3c89a477a5
4
- data.tar.gz: 751434de07685430512faf2ff6c970c5a6a1dde6ced7e536f1d65ad7ad0acf27
3
+ metadata.gz: 0b1e66ae2f5c7db756eb318d707b5b876f9fcebe16f63b8026dc4da70ef61df9
4
+ data.tar.gz: ad094777a2932128c522f0ec3a17d53e956dd501c88f4564c9fa9d4b34bdff99
5
5
  SHA512:
6
- metadata.gz: 8411d2a2141e28d778b47907d2594370c1f8c585d835e852a2f8c1ba46fba11ff9dab3abd7f3b5df269aa4149a7af4ca8055798d14ddf01cb484173695d78b1d
7
- data.tar.gz: 8fefa012326df5192ede21c356e081b696603fef3a1979143f18c3807bf567b4660f8f98ca2fee964f005a6c9d9dbdf5068b1a1e64b8b63f421a9e4555b96084
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,5 +1,5 @@
1
1
  class AddAdminToUser < ActiveRecord::Migration[7.0]
2
2
  def change
3
- add_column :users, :admin, :boolean, null: false, default: false
3
+ add_column :users, :admin, :boolean, null: false, default: false, if_not_exists: true
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  class AddLockVersionToUser < ActiveRecord::Migration[7.0]
2
2
  def change
3
- add_column :users, :lock_version, :bigint
3
+ add_column :users, :lock_version, :bigint, if_not_exists: true
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  class AddLockedToUser < ActiveRecord::Migration[7.0]
2
2
  def change
3
- add_column :users, :locked, :boolean, null: false, default: false
3
+ add_column :users, :locked, :boolean, null: false, default: false, if_not_exists: true
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  class AddAccessTokenToUser < ActiveRecord::Migration[7.0]
2
2
  def change
3
- add_column :users, :encrypted_access_token, :string
3
+ add_column :users, :encrypted_access_token, :string, if_not_exists: true
4
4
  end
5
5
  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,6 +1,6 @@
1
1
  class CreateRoleUsers < ActiveRecord::Migration[7.0]
2
2
  def change
3
- create_table :role_users do |t|
3
+ create_table :role_users, if_not_exists: true do |t|
4
4
  t.references :role, null: false, foreign_key: true
5
5
  t.references :user, null: false, foreign_key: true
6
6
 
@@ -1,33 +1,33 @@
1
- class CreatePermissionsChain < ActiveRecord::Migration[6.0]
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_auth_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni