LinguaCafe icon indicating copy to clipboard operation
LinguaCafe copied to clipboard

[Chore] Remove example_sentence column from table

Open uzluisf opened this issue 1 year ago • 2 comments

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/.

uzluisf avatar Apr 09 '24 13:04 uzluisf

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!

simjanos-dev avatar Apr 09 '24 14:04 simjanos-dev

@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.

uzluisf avatar Apr 20 '24 23:04 uzluisf

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! :)

simjanos-dev avatar May 29 '24 18:05 simjanos-dev