evoluteur / evolutility-server-node

Model-driven REST APIs for CRUD and more, written in Javascript, using Node.js, Express, and PostgreSQL.
GNU Affero General Public License v3.0
112 stars 33 forks source link

Migration script missing model/table names #1

Closed andrenventer closed 7 years ago

andrenventer commented 9 years ago

$ node server/models/database.js CREATE TABLE undefined ( id serial NOT NULL, "undefined" text, CONSTRAINT "undefined_pkey" PRIMARY KEY (id) ) WITH (OIDS=FALSE);

CREATE TABLE undefined ( id serial NOT NULL, "undefined" text, CONSTRAINT "undefined_pkey" PRIMARY KEY (id) ) WITH (OIDS=FALSE);

CREATE TABLE undefined ( id serial NOT NULL, "undefined" text, CONSTRAINT "undefined_pkey" PRIMARY KEY (id) ) WITH (OIDS=FALSE);

CREATE TABLE undefined ( id serial NOT NULL, "undefined" text, CONSTRAINT "undefined_pkey" PRIMARY KEY (id) ) WITH (OIDS=FALSE);

events.js:85 throw er; // Unhandled 'error' event ^ error: relation "undefined" already exists at Connection.parseE (/Users/nomad/Projects/evolutility-server-master/node_modules/pg/lib/connection.js:539:11) at Connection.parseMessage (/Users/nomad/Projects/evolutility-server-master/node_modules/pg/lib/connection.js:366:17) at Socket. (/Users/nomad/Projects/evolutility-server-master/node_modules/pg/lib/connection.js:105:22) at Socket.emit (events.js:107:17) at readableAddChunk (_stream_readable.js:163:16) at Socket.Readable.push (_stream_readable.js:126:10) at TCP.onread (net.js:538:20)

evoluteur commented 9 years ago

The error doesn't happen on my machine. Did you modify the UI-models?

andrenventer commented 9 years ago

No I am working with the vanilla install Maybe its not connecting to my db

shanequint commented 9 years ago

I am having the same issue. I think it is because the client/public/ui-models/apps/ does not exist. I created a new model and placed it in the folder tree I created to match, but it still doesn't work. I don't know if the format of the UI-models is different than the one's in the standard client app or not. I am trying to convert it to a MS SQL Server backend.

shanequint commented 9 years ago

Could it be that the client install is not working? step 2 below? 4- In the command line type the following:

Install dependencies

npm install

Add Evolutility client:

bower install

Copy Evolutility client to Node.js

grunt

Create sample tables

node server/models/database.js

Run node.js web server

npm start

evoluteur commented 9 years ago

I'm not sure why it doesn't work. As a workaround, steps 2 and 3 can be completed manually as follow:

andrenventer commented 7 years ago

It works today :)

Thank you for your recent work! Thank you for the License change! Thank you for the React front end!