From 6c9922a87fb72b958b78014c45b6cd1efafdd30e Mon Sep 17 00:00:00 2001 From: hellekin Date: Thu, 12 Nov 2020 23:39:13 +0100 Subject: Add Stimulus Map and Taxonomy (WIP) This commit add StimulusJS interaction for the map and taxonomy, as well as styling. It provides preliminary work to hook up live data on the map from the taxonomy. --- db/migrate/20201110225447_create_maps.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 db/migrate/20201110225447_create_maps.rb (limited to 'db/migrate') diff --git a/db/migrate/20201110225447_create_maps.rb b/db/migrate/20201110225447_create_maps.rb new file mode 100644 index 0000000..bf001f0 --- /dev/null +++ b/db/migrate/20201110225447_create_maps.rb @@ -0,0 +1,14 @@ +class CreateMaps < ActiveRecord::Migration[6.0] + def change + create_table :maps do |t| + t.uuid :uuid, null: false, unique: true + t.decimal :latitude, precision: 9, scale: 7 + t.decimal :longitude, precision: 10, scale: 7 + t.integer :zoom, default: 13 + t.references :taxonomy, null: false, foreign_key: true + + t.timestamps + end + add_index :maps, [:uuid], unique: true + end +end -- cgit v1.2.3