Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
fix: Fix lint errors in scripts/mysql/mysql-import-anonymous-data.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kulla committed Nov 2, 2023
1 parent 24509b8 commit 94e158b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/mysql/mysql-import-anonymous-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ main()
function main() {
const latestDump = getLatestDump()
if (!latestDump) {
// eslint-disable-next-line no-console
console.error('❌ Could not fetch latest dump, check your gsutil setup')
return
}
Expand All @@ -15,6 +16,7 @@ function main() {

const container = getMySQLContainer()
if (!container) {
// eslint-disable-next-line no-console
console.error(
'❌ MySQL container not found. Please start the database first with "yarn start"!',
)
Expand Down Expand Up @@ -80,8 +82,10 @@ function unzipAndCopyToContainer(fileName: string, container: string) {
}

function populateDumpInMySql() {
// eslint-disable-next-line no-console
console.log('🟢 Start importing MySQL data')
execCommand(`pv ${TMP_DIR}/mysql.sql | serlo-mysql`)
// eslint-disable-next-line no-console
console.log('🟢 Start importing anonymized user data')
execSql(
"LOAD DATA LOCAL INFILE '/tmp/user.csv' INTO TABLE user FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' IGNORE 1 ROWS;",
Expand Down

0 comments on commit 94e158b

Please sign in to comment.