Last active
August 29, 2015 13:57
-
-
Save tanepiper/9742731 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instance.db.User.sync(function() { | |
Instance.db.Client.sync(function() { | |
Instance.db.Project.sync(function() { | |
Instance.db.Campaign.sync(); | |
}) | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> adon-platform@0.0.1 sync /Users/tanepiper/work/pebblecode/adon-platform | |
> node scripts/sync.js | |
Executing (default): CREATE TABLE IF NOT EXISTS "campaigns" ("id" SERIAL , "name" VARCHAR(255) NOT NULL, "shortcode" VARCHAR(255), "url" VARCHAR(255), "projectId" INTEGER REFERENCES "projects" ("id") ON DELETE CASCADE, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "clientId" INTEGER, PRIMARY KEY ("id")); | |
Executing (default): CREATE TABLE IF NOT EXISTS "campaigns" ("id" SERIAL , "name" VARCHAR(255) NOT NULL, "shortcode" VARCHAR(255), "url" VARCHAR(255), "projectId" INTEGER REFERENCES "projects" ("id") ON DELETE CASCADE, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "clientId" INTEGER, PRIMARY KEY ("id")); | |
Executing (default): CREATE TABLE IF NOT EXISTS "campaigns" ("id" SERIAL , "name" VARCHAR(255) NOT NULL, "shortcode" VARCHAR(255), "url" VARCHAR(255), "projectId" INTEGER REFERENCES "projects" ("id") ON DELETE CASCADE, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "clientId" INTEGER, PRIMARY KEY ("id")); | |
Executing (default): CREATE TABLE IF NOT EXISTS "campaigns" ("id" SERIAL , "name" VARCHAR(255) NOT NULL, "shortcode" VARCHAR(255), "url" VARCHAR(255), "projectId" INTEGER REFERENCES "projects" ("id") ON DELETE CASCADE, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "clientId" INTEGER, PRIMARY KEY ("id")); | |
Executing (default): CREATE TABLE IF NOT EXISTS "campaigns" ("id" SERIAL , "name" VARCHAR(255) NOT NULL, "shortcode" VARCHAR(255), "url" VARCHAR(255), "projectId" INTEGER REFERENCES "projects" ("id") ON DELETE CASCADE, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "clientId" INTEGER, PRIMARY KEY ("id")); | |
Executing (default): CREATE TABLE IF NOT EXISTS "campaigns" ("id" SERIAL , "name" VARCHAR(255) NOT NULL, "shortcode" VARCHAR(255), "url" VARCHAR(255), "projectId" INTEGER REFERENCES "projects" ("id") ON DELETE CASCADE, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "clientId" INTEGER, PRIMARY KEY ("id")); | |
Executing (default): CREATE TABLE IF NOT EXISTS "campaigns" ("id" SERIAL , "name" VARCHAR(255) NOT NULL, "shortcode" VARCHAR(255), "url" VARCHAR(255), "projectId" INTEGER REFERENCES "projects" ("id") ON DELETE CASCADE, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "clientId" INTEGER, PRIMARY KEY ("id")); | |
events.js:72 | |
throw er; // Unhandled 'error' event | |
^ | |
error: relation "projects" does not exist | |
at Connection.parseE (/Users/tanepiper/work/pebblecode/adon-platform/node_modules/pg/lib/connection.js:561:11) | |
at Connection.parseMessage (/Users/tanepiper/work/pebblecode/adon-platform/node_modules/pg/lib/connection.js:390:17) | |
at null.<anonymous> (/Users/tanepiper/work/pebblecode/adon-platform/node_modules/pg/lib/connection.js:92:20) | |
at Socket.EventEmitter.emit (events.js:95:17) | |
at Socket.<anonymous> (_stream_readable.js:746:14) | |
at Socket.EventEmitter.emit (events.js:92:17) | |
at emitReadable_ (_stream_readable.js:408:10) | |
at emitReadable (_stream_readable.js:404:5) | |
at readableAddChunk (_stream_readable.js:165:9) | |
at Socket.Readable.push (_stream_readable.js:127:10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment