Skip to content

Commit a93054a

Browse files
authored
Merge pull request #4 from typecraft-dev/ep-4-active-record-explained
add new fields to Projects and Todos
2 parents b751ead + 857412a commit a93054a

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class AddCompletedAndPriorityToTodos < ActiveRecord::Migration[8.0]
2+
def change
3+
add_column :todos, :completed, :boolean, default: false, null: false
4+
add_column :todos, :priority, :integer, default: 1, null: false
5+
end
6+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddActiveToProjects < ActiveRecord::Migration[8.0]
2+
def change
3+
add_column :projects, :active, :boolean, default: true, null: false
4+
end
5+
end

db/schema.rb

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)