Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Following this tutorial and the create table code does not work

 
Ranch Hand
Posts: 90
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am using postgresql and I made som minor changes, the original code is in this link:
Original code
 
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Does not work" doesn't really help us.  What exactly goes wrong?  Error message?  Then copy and paste it here.
 
martin codey
Ranch Hand
Posts: 90
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry here you got it:

ERROR:  syntax error at or near "("
LINE 2:   id bigint(20) unsigned NOT NULL AUTO_INCREMENT,

ERROR:  syntax error at or near "("
LINE 2:   follower bigint(20) unsigned NOT NULL,

ERROR:  syntax error at or near "'image_uploader_to_user_id'"
LINE 2:   ADD CONSTRAINT 'image_uploader_to_user_id' FOREIGN KEY ('u...

ERROR:  syntax error at or near "'follow_follower_to_user_id'"
LINE 2:   ADD CONSTRAINT 'follow_follower_to_user_id' FOREIGN KEY ('...


ERROR:  syntax error at or near "'follow_follows_to_user_id'"
LINE 2:   ADD CONSTRAINT 'follow_follows_to_user_id' FOREIGN KEY ('f...
 
Knute Snortum
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PostgreSQL does not support unsigned integer (or bigint).  Evidently this tutorial was not designed for PostgreSQL.
 
martin codey
Ranch Hand
Posts: 90
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic