● videoDeployment
The First Deployment

Unlock Revisiting Ruby on Rails
Subscribe for full access to every course, or buy this one on its own.
SECTION
Deployment
NEXT UP
Setting Up S3 CDN
COURSE
Rails Revisited
33 lessons
About this lesson
We'll need to add a migration so that Spina has its data, so let's do that quickly:
rails g migration AddSpinaNeedful
In the new migration file, you can add this:
class AddSpinaNeedful < ActiveRecord::Migration[7.1]
def up
#We need an account - this will also create a page for us
Spina::Account.create!(name: "Railzzz", theme: "default")
Spina::Navigation.create!(
name: "mains",
label: "Main menu"
)
end
def down
Spina::Account.destroy_all
Spina::Navigation.destroy_all
page = Spina::Page.where(name: "homepage").destroy_all
end
end
When you add an account, Spina will create a homepage for you, which is nice.
Unlock Revisiting Ruby on Rails
Subscribe for full access to every course, or buy this one on its own.