amber v0.30.0 Release Notes
Release Date: 2019-08-08 // over 4 years ago-
- 1259f58 Crystal v0.30.0 changes (#1126) by @bcardiff @drujensen
- 👕 3465f1d Linting issues (#1117) by @veelenga
- 🍱 e933401 Clean up assets (#1113) by @smadeja
_ 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
withconnection
,table_name
withtable
,primary
withcolumn .., primary: true
, andfield
withcolumn
. 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? timestampsend