-
Notifications
You must be signed in to change notification settings - Fork 131
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
Updates deprecated Old Tupi (tpw) to Tupinambá (tpn) #3158
base: dev
Are you sure you want to change the base?
Conversation
$audioBasePath = Configure::read('Recordings.path'); | ||
if (is_dir($audioBasePath.DS.$from)) { | ||
rename($audioBasePath.DS.$from, $audioBasePath.DS.$to); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to rename audio directories anymore since #2880 was merged. This is because audio files are no longer placed into lang subdirectories.
|
||
class OldTupiCodeRename extends AbstractMigration | ||
{ | ||
private $langColumns = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory you want to add the new column
'audios' => ['sentence_lang'],
let’s say, for the sake of completeness. But in practice it’s not really necessary because we don’t have any audio in Old Tupi.
Would you like me to make those changes, or are you just mentioning those for posterity? Also, where exactly would that new column be added if there was existing audio? |
Well it’s your pull request so you have to make the suggested changes (unless you ticked "allow maintainters to modify this PR" setting when you created it). My initial thought was that you take care of the flags and language name changes and I handle the code part, but since you added a migration script to your pull request, I take it that you want to contribute some code too, which is great by the way, so I am reviewing it. The "column" I mentioned is a column in the SQL table that contains data about audio recordings. CREATE TABLE `audios` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sentence_id` int(11) NOT NULL,
`sentence_lang` varchar(4) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`external` varchar(500) DEFAULT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `sentence_id` (`sentence_id`)
); So there are 7 columns, one of them |
My programming capabilities are basic at best, I took one semester of Python, so maybe not much that I would be able to do 😅 |
'contributions' => ['sentence_lang', 'translation_lang'], | ||
'contributions_stats' => ['lang'], | ||
'languages' => ['code'], | ||
'audios' => = ['sentence_lang'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo here. It should be
'audios' => ['sentence_lang'],
without the extra equal sign.
And one last thing, the migration file should be named with a .php extension, e.g. |
There is also a problem with the name of your migration script file. The prefix number 20250125 is used to compare against other migration scripts in |
This issue seeks to solve #3140
This was almost entirely based off jiru's fix #2900