From f48ce2f4c934fde3862cdad593eececc7a567d61 Mon Sep 17 00:00:00 2001 From: hellekin Date: Fri, 9 Oct 2020 10:24:06 +0200 Subject: Add Classifications and Resource validations - Turn `has_and_belongs_to_many` into `has_many :through`: now, resources and sections are related through Classifications. - Refactor usage of jsonb column to use ActiveRecord validations - Attention! store_accessor: NOTE: If you are using structured database data types (eg. PostgreSQL hstore/json, or MySQL 5.7+ json) there is no need for the serialization provided by .store. Simply use .store_accessor instead to generate the accessor methods. Be aware that these columns use a string keyed hash and do not allow access using a symbol. NOTE: The default validations with the exception of uniqueness will work. For example, if you want to check for uniqueness with hstore you will need to use a custom validation to handle it. https://api.rubyonrails.org/classes/ActiveRecord/Store.html --- app/models/schemas/resource_feature_properties.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 app/models/schemas/resource_feature_properties.json (limited to 'app/models/schemas') diff --git a/app/models/schemas/resource_feature_properties.json b/app/models/schemas/resource_feature_properties.json new file mode 100644 index 0000000..84cd6ae --- /dev/null +++ b/app/models/schemas/resource_feature_properties.json @@ -0,0 +1,12 @@ +// JSON Schema for Resource#feature +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://api.incommon.cc/schema/resource_feature.json", + "title": + "type": "object", + "required": [], + "geometry": { + }, + "properties": { + } +} -- cgit v1.2.3