textacular / textacular

Textacular exposes full text search capabilities from PostgreSQL, and allows you to declare full text indexes. Textacular will extend ActiveRecord with named_scope methods making searching easy and fun!
https://github.com/textacular
941 stars 87 forks source link

Migration failed - SQL Syntax Error - "CREATE EXTENSION" #123

Closed thewilliamchan closed 5 years ago

thewilliamchan commented 5 years ago

After running the command rake db:migrate, I get the below syntax error

SQLite3::SQLException: near "EXTENSION": syntax error: CREATE EXTENSION IF NOT EXISTS pg_trgm;

This is the migration file

class InstallTrigram < ActiveRecord::Migration[5.0]
  def self.up
    ActiveRecord::Base.connection.execute("CREATE EXTENSION IF NOT EXISTS pg_trgm;")
  end

  def self.down
    ActiveRecord::Base.connection.execute("DROP EXTENSION pg_trgm;")
  end
end
gregmolnar commented 5 years ago

textacular only works with postgresql.