Comments (3)
Hi @pvagare,
Did you change the migration file to force a foreign key reference between survey_questions and surveys?
I'm trying to mimic your issues with the migration, but I'm not seeing that constraint in the Postgres generated SQL. Could you show me the 20150515142125_create_survey.rb and your schema.rb files?
Thank you!
from survey.
Hi! A few years later but I am having the same error. Just following the instruction in the read me (no changes in the migration) and I have this same result:
`$ bundle exec rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
== 20170522133701 CreateSurvey: migrating =====================================
-- create_table(:survey_surveys)
-> 0.1217s
-- create_table(:survey_questions)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedTable: ERROR: relation "surveys" does not exist
: CREATE TABLE "survey_questions" ("id" serial primary key, "survey_id" integer , "text" character varying , "created_at" timestamp , "updated_at" timestamp , CONSTRAINT fk_survey_questions_survey_id FOREIGN KEY ("survey_id") REFERENCES "surveys" ("id"))
`
from survey.
@alex-quiterio sorry for unassigning you. No idea of how i did it...
from survey.
Related Issues (20)
- ActiveModel::ForbiddenAttributesError HOT 3
- Attach a Survey to a parent Model HOT 1
- Survey response types HOT 3
- Migration fails HOT 1
- link_to_function in the helper is deprecated in Rails 4. HOT 4
- Mongoid HOT 2
- Add support for simple_form
- rails generate survey rails_admin exception HOT 3
- Conditional questions
- ragarding creating a quiz app in rails
- ragarding creating a quiz app in rails
- Plain generation not creating routes HOT 1
- config/locales/en.yml has mispelling in suveys_controller #create and #update actions
- Routes are not generated
- Add support to require specific questions prior to form submit
- strong parameters for active admin HOT 1
- undefined method in the form
- Rails 5 Support HOT 11
- Is there a easy way to Add free text answer field? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from survey.