· 6 years ago · Jul 25, 2019, 03:22 PM
1{ error: cannot drop table todolist because other objects depend on it
2 at Connection.parseE (/Users/macbook/work/loopback4-example-todo-list/node_modules/pg/lib/connection.js:602:11)
3 at Connection.parseMessage (/Users/macbook/work/loopback4-example-todo-list/node_modules/pg/lib/connection.js:399:19)
4 at Socket.<anonymous> (/Users/macbook/work/loopback4-example-todo-list/node_modules/pg/lib/connection.js:121:22)
5 at Socket.emit (events.js:198:13)
6 at addChunk (_stream_readable.js:288:12)
7 at readableAddChunk (_stream_readable.js:269:11)
8 at Socket.Readable.push (_stream_readable.js:224:10)
9 at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
10...
11
12settings: {
13 foreignKeys: {
14 fk_todoListImage_todoListId: {
15 name: 'fk_todoListImage_todoListId',
16 entity: 'TodoList',
17 entityKey: 'id',
18 foreignKey: 'todolistid'
19 },
20 },
21 }
22})
23
24existingSchema,
25 models: ['TodoList', 'Todo', 'TodoListImage']
26 });
27
282019-07-25 17:48:50.937 MSK [2641] DETAIL: constraint fk_todo_todoListId on table todo depends on table todolist
29 constraint fk_todoListImage_todoListId on table todolistimage depends on table todolist
302019-07-25 17:48:50.937 MSK [2641] HINT: Use DROP ... CASCADE to drop the dependent objects too.
312019-07-25 17:48:50.937 MSK [2641] STATEMENT: DROP TABLE IF EXISTS "public"."todolist"
322019-07-25 17:48:50.943 MSK [2640] ERROR: schema "public" already exists
332019-07-25 17:48:50.943 MSK [2640] STATEMENT: CREATE SCHEMA "public"
342019-07-25 17:48:50.944 MSK [2642] ERROR: schema "public" already exists
352019-07-25 17:48:50.944 MSK [2642] STATEMENT: CREATE SCHEMA "public"
362019-07-25 17:48:50.946 MSK [2643] ERROR: relation "todolist" already exists
372019-07-25 17:48:50.946 MSK [2643] STATEMENT: CREATE TABLE "public"."todolist" (
38 "id" INTEGER NOT NULL,
39 "title" TEXT NOT NULL,
40 "color" TEXT,
41 PRIMARY KEY("id")
42 )
432019-07-25 17:48:50.959 MSK [2644] LOG: incomplete startup packet```