In this episode, we dive into actually creating columns for our board! First, we set up a new Column
model and the necessary database migration. We talk about why we relate columns both to users and boards, which helps keep ownership simple and makes our queries a lot cleaner – plus it’s going to come in handy later when dealing with sorting.
Once the migration is all set up, we go ahead and manually create a few column records in our database to test things out. We make sure to give them a simple order field so we can control their positions on the board.
Next, we hop over to the board display code and set up the relationship so that each board knows about its columns. We iterate over these columns in the template so they actually show up on the board instead of using placeholder data. We also make sure to wire up the data properly so that the columns display their correct titles and are keyed by their IDs for efficient rendering.
By the end of the video, you'll see real column data showing up on your board – not just fake placeholders. This sets us up nicely for adding even more functionality in the next steps!