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

[Chore] Remove example_sentence column from table #203

Closed
wants to merge 1 commit into from

Conversation

uzluisf
Copy link
Contributor

@uzluisf uzluisf commented Apr 9, 2024

Description

Remove example_sentence column from the encountered_words table since it already exists in the example_sentences table.

Related: #22

Testing

  1. Rebuild Docker image.
chmod -R 777 ./ && docker compose -f ./docker-compose-dev-macos.yml build && docker compose -f ./docker-compose-dev-macos.yml up -d --force-recreate
  1. Run the local server.
docker exec -ti linguacafe-webserver-dev npm run watch-poll
  1. Log into LinguaCafe at http://localhost:3000/.

Remove `example_sentence` column from the `encountered_words` table since it
already exists in the `example_sentences` table.
@simjanos-dev
Copy link
Owner

simjanos-dev commented Apr 9, 2024

This would only work for a new empty database. It should be also removed from existing databases instead with a new migration file.

There's an example in this file: database/migrations/2022_04_20_143750_modify_daily_achivements_table.php

Laravel migration docs. Migrations are written in a very poor way, currently they cannot be rolled back. I want to rewrite them in the future, but had no time for it so far, and it will be difficult for already existing users.

Please also check if the phrases table have this column, but I don't think so. I've checked it, it does not have it.

Thank you so much for working on it!

@uzluisf
Copy link
Contributor Author

uzluisf commented Apr 20, 2024

@simjanos-dev I kinda slacked off on this one. I took a cursory look at those docs and couldn't figure out what I really needed to do (1st time hearing about schemas under version control) 😅 I'll try reading the docs again tomorrow and taking a stab at it.

@simjanos-dev
Copy link
Owner

Removed the column from the database.

But I appreciate your help! Feel free to open further PR-s if you would like to.

Hope you are enjoying linguacafe! :)

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.

None yet

2 participants