I'm having the following error when creating a POSTGRESQL database:
SQL CODE:
CREATE DATABASE pesadaum;
CREATE TABLE user(
user_id int PRIMARY KEY NOT NULL AUTO_INCREMENT,
email varchar(255) NOT NULL,
heavy_pass varchar(255) NOT NULL
);
CREATE TABLE admin_user(
admin_user_id int PRIMARY KEY NOT NULL AUTO_INCREMENT,
email varchar(255) NOT NULL,
heavy_pass varchar(255) NOT NULL,
admin_name varchar(255) NOT NULL,
rg varchar(15) NOT NULL,
cpf varchar(15) NOT NULL,
access_lvl boolean NOT NULL,
);
CREATE TABLE problem(
problem_id int PRIMARY KEY NOT NULL AUTO_INCREMENT,
address point,
description text
user_id int NOT NULL REFERENCES user(user_id)
);
CREATE TABLE img(
img_id int PRIMARY KEY NOT NULL AUTO_INCREMENT,
url varchar(255) NOT NULL,
status_acc boolean,
problem_id int NOT NULL REFERENCES problem_id(problem_id)
);
CREATE TABLE error(
error_id int PRIMARY KEY NOT NULL AUTO_INCREMENT,
error_name varchar(255),
error_description TEXT,
);
CREATE TABLE error_problem_plug(
problem_id int NOT NULL REFERENCES problem(problem_id),
error_id int NOT NULL REFERENCES error(error_id)
);