start of iteration 2
This commit is contained in:
parent
9fb87a74ce
commit
729ed13521
75 changed files with 705 additions and 170 deletions
12
db/migrate/20241030230805_create_pages.rb
Normal file
12
db/migrate/20241030230805_create_pages.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
class CreatePages < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :pages do |t|
|
||||
t.integer :position
|
||||
t.string :path
|
||||
t.string :url
|
||||
t.references :report, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
6
db/migrate/20241030231244_add_page_id_to_elements.rb
Normal file
6
db/migrate/20241030231244_add_page_id_to_elements.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class AddPageIdToElements < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_reference :elements, :page, null: false, foreign_key: true
|
||||
add_column :elements, :position, :integer, default: 0, null: false
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class RemoveReportIdFromElements < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
remove_reference :elements, :report, null: false, foreign_key: true
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class AddQuickFieldsToSuccessCriterion < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_reference :success_criteria, :check, null: true, foreign_key: true
|
||||
add_column :success_criteria, :priority, :integer
|
||||
end
|
||||
end
|
||||
5
db/migrate/20241031183755_remove_path_from_elements.rb
Normal file
5
db/migrate/20241031183755_remove_path_from_elements.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class RemovePathFromElements < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
remove_column :elements, :path, :string
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue