Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'New Model' modal/dialog does not prevent creation of pre-existing Models #6

Open
travis-a-hoffman opened this issue Jul 31, 2015 · 0 comments

Comments

@travis-a-hoffman
Copy link

I'm new to caribou, was trying to create a Model object called "Role", which I meant as a "Role in a Story." The resulting error (in the log) shows the following attempted SQL:

DEBUG :db create table role ([:id "SERIAL" "PRIMARY KEY"] [:uuid "varchar(255)"] [:position :integer "DEFAULT 0"] [:env-id :integer "DEFAULT 1"] [:locked :boolean "DEFAULT false"] [:created-at "timestamp" "NOT NULL" "DEFAULT current_timestamp"] [:updated-at "timestamp" "NOT NULL"])
DEBUG :stacktrace >>> org.h2.jdbc.JdbcSQLException: Table "ROLE" already exists; SQL statement:
CREATE TABLE role (id SERIAL PRIMARY KEY, uuid varchar(255), position integer DEFAULT 0, env_id integer DEFAULT 1, locked boolean DEFAULT false, created_at timestamp NOT NULL DEFAULT current_timestamp, updated_at timestamp NOT NULL) [42101-170]

The admin UI results in a blank page. Nothing seems to be borked on the backend, but I haven't dug any deeper. I've tried with other pre-existing models, same result. Basically, 'New Model' just needs a check to prevent this, or to handle this error case more cleanly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant