Skip to content

Commit

Permalink
refactor: Remove charset property from lrc_content column fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
the-sabra committed Sep 27, 2024
1 parent e58bba0 commit 12a6d36
Show file tree
Hide file tree
Showing 11 changed files with 7,260 additions and 80,233 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ As of [Date], all contributions and modifications made to the Mostaqem project,

## Contact

For permissions, legal advice, or any questions, contact omarsabra509@gmail.com
For permissions, legal advice, or any questions, contact omarsabra509@gmail.com
2 changes: 1 addition & 1 deletion migrations/1727101506932-add-lrc-column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class AddLrcColumn1727101506932 implements MigrationInterface {
`ALTER TABLE \`tilawa_surah\` ADD \`lrc_content\` mediumtext NULL`,
);

const sqlQueries = readSqlFile('/lrc-seed/9.sql');
const sqlQueries = readSqlFile('/lrc-seed/lrc-data.sql');
for (const query of sqlQueries) {
await queryRunner.query(query);
}
Expand Down
26 changes: 26 additions & 0 deletions migrations/1727195723850-add-custom-codec-for-search.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

/**
* This migration is to add custom codec for search
* in the database for Arabic language see this link for more info
* https://shorturl.at/4rnrf
*/
export class AddCustomCodecForSearch1727195723850
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
queryRunner.query(
`ALTER TABLE reciter MODIFY name_arabic VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_arabic_ci;`,
);

queryRunner.query(
`ALTER TABLE verse MODIFY vers TEXT CHARACTER SET utf8 COLLATE utf8_arabic_ci;`,
);

queryRunner.query(
`ALTER TABLE surah MODIFY name_arabic VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_arabic_ci;`,
);
}

public async down(queryRunner: QueryRunner): Promise<void> {}
}
Loading

0 comments on commit 12a6d36

Please sign in to comment.