mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Update visited_countries column type to jsonb
This commit is contained in:
parent
52fe105230
commit
c681fdbdb6
4 changed files with 8 additions and 4 deletions
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
class AddVisitedCountriesToTrips < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :trips, :visited_countries, :jsonb, default: []
|
||||
safety_assured do
|
||||
execute <<-SQL
|
||||
ALTER TABLE trips ADD COLUMN visited_countries JSONB DEFAULT '{}'::jsonb NOT NULL;
|
||||
SQL
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
2
db/schema.rb
generated
2
db/schema.rb
generated
|
|
@ -224,7 +224,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_05_15_192211) do
|
|||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.geometry "path", limit: {srid: 3857, type: "line_string"}
|
||||
t.jsonb "visited_countries", default: []
|
||||
t.jsonb "visited_countries", default: {}, null: false
|
||||
t.index ["user_id"], name: "index_trips_on_user_id"
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ RUN apk -U add --no-cache \
|
|||
less \
|
||||
yaml-dev \
|
||||
gcompat \
|
||||
libgeos-dev \
|
||||
geos \
|
||||
&& mkdir -p $APP_PATH
|
||||
|
||||
# Update gem system and install bundler
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ RUN apk -U add --no-cache \
|
|||
less \
|
||||
yaml-dev \
|
||||
gcompat \
|
||||
libgeos-dev \
|
||||
geos \
|
||||
&& mkdir -p $APP_PATH
|
||||
|
||||
# Update gem system and install bundler
|
||||
|
|
|
|||
Loading…
Reference in a new issue