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

Add tables for forms models #1740

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add tables for forms models #1740

wants to merge 3 commits into from

Conversation

lfdebrux
Copy link
Member

What problem does this pull request solve?

Trello card: https://trello.com/c/xotu6KNy/1995-add-tables-for-form-models-to-forms-admin

We want to migrate the records for forms conditions and pages to this app from forms-api.

This PR adds the tables we'll need in the database.

I've purposely not added models to use those tables, as for now we want the tables to be empty and unused.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Has all relevant documentation been updated?

Copies lines 37-48,50-75,85-100 in [forms-api/db/schema.rb] into a new
database migration for this app, so that we have the same tables in the
forms-admin database.

[forms-api/db/schema.rb]: https://github.com/alphagov/forms-api/blob/c1cf1c081020abf779977153fe58f3d73b1af3a8/db/schema.rb
- Remove force: :cascade
- Use timestamps shortcut
- Use references shortcut
- Let Rails choose index name
Ran `bin/rails db:migrate` to get the latest version of the database
schema dump.
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

Successfully merging this pull request may close these issues.

1 participant