Skip to content

Instantly share code, notes, and snippets.

View nepalez's full-sized avatar

Andrew Kozin nepalez

  • Evil Martians
  • Lisbon, Portugal
View GitHub Profile
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active July 13, 2024 02:57
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@khamusa
khamusa / postgres_custom_enums_on_rails_schema_migrations.rb
Last active January 12, 2022 14:19
Support custom postgres enum types on rails migrations and schema.rb
# frozen_string_literal: true
# Adds migration and schema.rb support to postgres custom enum types, tested on rails 4.2
# The implementation is quite fragile against ActiveRecord version upgrades since it touches many core AR classes.
# The following code should be placed in an initializer
# On migrations:
#
# create_enum(:mood, %w(happy great been_better))
# create_table :person do
# t.enum :person_mood, enum_name: :mood
# end
@wbailey
wbailey / databases.rake
Created February 11, 2011 08:58
ActiveRecord migrations outside of Rails
require 'yaml'
require 'logger'
require 'active_record'
namespace :db do
def create_database config
options = {:charset => 'utf8', :collation => 'utf8_unicode_ci'}
create_db = lambda do |config|
ActiveRecord::Base.establish_connection config.merge('database' => nil)