
If you've worked with Rails, you probably know that the first deployment is usually a matter of herding 100 or so cats. Still the same.
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.