Postgresql Notes
-- List databases
$> \l
-- Connect to a database
$> \c orendaa_development
-- Create extension citext
$> CREATE EXTENSION citext;
-- List users
$> \du
To use postgis
extension
- Add
gem 'activerecord-postgis-adapter'
inGemfile
- Do
bundle install
- Create a migration to add the PostGIS extension to your database.
$> rails g migration AddPostgisExtensionToDatabase
- Add
enable_extension postgis
class AddPostgisExtensionToDatabase < ActiveRecord::Migration[7.0] def change enable_extension 'postgis' end end
- Run
rails db:migrate
This is a sapling 🌱 in my digital garden 🏡.
Notes mentioning this note
There are no notes linking to this note.