Releases: Invoca/declare_schema
Release v0.6.3
Added
- Added
add_foreign_keynative rails call inDeclareSchema::Model::ForeignKeyDefinition#to_add_statement.
Fixed
-
Fixed a bug in migration generation caused by
DeclareSchema::Migration#create_constraints
callingDeclareSchema::Model::ForeignKeyDefinition#to_add_statementwith unused parameters. -
Fixed a bug in
DeclareSchema::Migration#remove_foreign_keywhere special characters would not be quoted properly.
Release v0.6.2
Added
- Added
sqlite3as dev dependency for local development
Fixed
- Fixed a bug in migration generation caused by
DeclareSchema::Model::ForeignKeyDefinition#to_add_statement
not being passed proper arguments.
Release v0.6.1
Added
- Added Appraisals for MySQL as well as SQLite.
Fixed
- Fixed case where primary key index will be gone by the time we get to dropping that primary key
because all of the existing primary key columns are being removed.
Release v0.6.0
Added
- Fields may now be declared with
:biginttype which is identical to:integer, limit 8 - FieldSpec#initialize interface now includes
positionkeyword argument and**optionshash.
Fixed
- Fixed cycle in which FieldSpec#initialize was calling
model.field_specs
Changed
- Changed ci support from Travis to Github Workflow
Release v0.5.0
Added
- Added support for configuring the character set and collation for MySQL databases
at the global, table, and field level
Release v0.4.2
Fixed
- Generalize the fix below to sqlite || Rails 4.
Release v0.4.1
Fixed
- Fixed a bug detecting compound primary keys in Rails 4.
Release v0.4.0
Added
-
Fields may be declared with
serialize: trueorserialize: <serializeable-class>, where<serializeable-class>
may beArray(Arraystored as YAML) orHash(Hashstored as YAML), (ArrayorHashor any scalar value stored as JSON)
or any custom serializable class.
This invokesActiveSupport'sserializemacro for that field, passing the serializable class, if given.Note: when
serialize:is used, anydefault:should be given in a matching Ruby type--for example,[]or{}or{ 'currency' => 'USD' }--in
which case the serializeable class will be used to determine the serialized default value and that will be set as the SQL default.
Fixed
- Sqlite now correctly infers the PRIMARY KEY so it won't attempt to add that index again.