github amberframework/amber v0.30.0
Crystal 0.30.0 support

latest releases: v1.4.1, v1.4.0, v1.3.2...
4 years ago

BREAKING CHANGES
The DSL for Granite have been changed. In order to upgrade from 0.29.0 or earlier, make the following modifications:

In the config/database.cr, replace the Granite::Adapters line with:

Granite::Connections << Granite::Adapter::Mysql.new(name: "mysql", url: Amber.settings.database_url)

In your models, replace adapter with connection, table_name with table, primary with column .., primary: true, and field with column. Also, add a ? for Nilable columns. Here is an example model:

class Post < Granite::Base
  connection mysql
  table posts

  belongs_to :user

  column id : Int64, primary: true
  column title : String?
  column body : String?
  timestamps
end

Don't miss a new amber release

NewReleases is sending notifications on new releases.