Open maciejjankowski opened 10 years ago
When I first run the application it works okay, but after it terminates and I try running it again I get the following error:
(orm/postgres) CREATE TABLE "events" ("date" TIMESTAMP WITHOUT TIME ZONE, "etime" INTEGER, "id" INTEGER, "league" VARCHAR(255), "home" VARCHAR(255), "away" VARCHAR(255), "evStatus" VARCHAR(255), PRIMARY KEY ("id")) c:\soket\db.js:33 error: relation "events" already exists
offending code:
exports.dbconnect = function(cb){ orm.connect(connString, function (err, db) { if (err) throw err; Event = db.define("events", { date : {type: "date", time: true} , etime : {type : "number", rational : false} , id : {type : "number", rational: false} , league : String , home : String , away : String , evStatus : String }, {} ) .sync(function(err){ // line 33 is here if(err) throw err;
When I first run the application it works okay, but after it terminates and I try running it again I get the following error:
offending code: