skip to Main Content

Postgresql – column "name" does not exist

I am having issue with ALIAS variable "distance" in my PSQL query. (*please ignore that I am using voutecount as distance) SELECT rentalid, createdDate, votecount AS distance FROM rental WHERE longitude=? AND latitude=? HAVING distance < 25 ORDER BY distance…

VIEW QUESTION

Postgresql – Why insert into the table is causing conflicts with already existing primary keys?

I have this table CREATE TABLE IF NOT EXISTS public.campaign_result ( id integer NOT NULL DEFAULT nextval('campaign_result_id_seq'::regclass), state result_state NOT NULL DEFAULT 'processing'::result_state, data json NOT NULL, response json, act result_action NOT NULL DEFAULT 'none'::result_action, message character varying COLLATE pg_catalog."default",…

VIEW QUESTION

Javascript – does not write to PSQL, help please

/home/aam/exp/server/node_modules/sequelize/lib/instance-validator.js:50 throw new sequelizeError.ValidationError(null, this.errors); ^ ValidationError [SequelizeValidationError]: notNull Violation: brand.name cannot be null at InstanceValidator._validate (/home/aam/exp/server/node_modules/sequelize/lib/instance-validator.js:50:13) at async InstanceValidator._validateAndRunHooks (/home/aam/exp/server/node_modules/sequelize/lib/instance-validator.js:60:7) at async InstanceValidator.validate (/home/aam/exp/server/node_modules/sequelize/lib/instance-validator.js:54:12) at async model.save (/home/aam/exp/server/node_modules/sequelize/lib/model.js:2426:7) at async brand.create (/home/aam/exp/server/node_modules/sequelize/lib/model.js:1362:12) at async create (/home/aam/exp/server/controllers/brandController.js:7:21) { errors: […

VIEW QUESTION
Back To Top
Search