rubocop corrections
This commit is contained in:
parent
c63c6bc448
commit
de29815686
72 changed files with 468 additions and 311 deletions
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateAuthors < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :authors do |t|
|
||||
|
@ -7,6 +9,6 @@ class CreateAuthors < ActiveRecord::Migration[6.1]
|
|||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :authors, [ :first_name, :last_name ]
|
||||
add_index :authors, %i[first_name last_name]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateBooks < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :books do |t|
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateAuthorsBooks < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :authors_books do |t|
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateUsers < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :users do |t|
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ChangeUsernameToEmail < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
rename_column :users, :username, :email
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddPasswordRecoveryCodeToUsers < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :users, :password_recovery_code, :string
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ChangePasswordRecoveryCodeToRecoveryPasswordDigest < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
rename_column :users, :password_recovery_code, :recovery_password_digest
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddRoleToUsers < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :users, :role, :integer
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddStatusToUsers < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :users, :status, :integer
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateAuditRecords < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :audit_records do |t|
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddQuantityToBooks < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :books, :quantity, :integer
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateBooksUsers < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :books_users do |t|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue