mpawlak2 / instalike-instagram-bot

automate instagram activities using instagram bot - like follow/unfollow comment; python requests lib
https://github.com/mpawlak2/instalike-instagram-bot
142 stars 43 forks source link

Cannot setup database using db_setup.sql #13

Closed mico closed 8 years ago

mico commented 8 years ago

Getting error:

MacBook-Pro-Artur:instalike-instagram-bot mico$ createdb instalike
MacBook-Pro-Artur:instalike-instagram-bot mico$ psql -d instalike < db_setup.sql
CREATE TABLE
CREATE TABLE
CREATE TABLE
INSERT 0 6
CREATE TABLE
CREATE TABLE
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE TABLE
CREATE FUNCTION
CREATE TABLE
CREATE FUNCTION
CREATE TABLE
CREATE FUNCTION
CREATE TABLE
CREATE FUNCTION
CREATE FUNCTION
ALTER FUNCTION
ERROR:  syntax error at or near "on"
LINE 14: on conflict(user_id) do nothing;
         ^
ERROR:  function public.update_unfollow_queue(integer) does not exist
CREATE FUNCTION
MacBook-Pro-Artur:instalike-instagram-bot mico$ 
mpawlak2 commented 8 years ago

Hi @mico

yeah, postgresql supports 'on conflict' from 9.5 so you probably have older version? Updated readme.

mico commented 8 years ago

@mpawlak2 yes, I had 9.4 updated to 9.5, that error was dissapeared