README.md in unidom-common-0.7 vs README.md in unidom-common-0.8
- old
+ new
@@ -17,10 +17,11 @@
## Run the Database Migration
```shell
rake db:migrate
```
+The migration versions starts with 200001.
The migration enabled the PostgreSQL uuid-ossp extension.
## Include Concern in Models
```ruby
include Unidom::Common::Concerns::ModelExtension
@@ -57,10 +58,11 @@
class Project < ActiveRecord::Base
include Unidom::Common::Concerns::ModelExtension
notation_column :creator_comment, :last_updater_comment
+ notation_boolean_column :enabled
validates :creator_comment, allow_blank: true, length: { in: 2..200 }
validates :last_updater_comment, allow_blank: true, length: { in: 2..200 }
end
@@ -69,9 +71,12 @@
project.creator_comment = 'My first project.' # Stored in project.notation['columns']['creator_comment']
project.valid? # true
Project.notation_column_where(:creator_comment, :like, 'first') # Fuzzy search the creator_comment column
Project.notation_column_where(:creator_comment, '=', 'My first project.')
+
+project.enabled = true
+project.enabled? # true
```
## ActiveRecord Migration Naming Convention
### Domain Models (200YMMDDHHMMSS)
* unidom-common: 200001DDHHMMSS