@crowdin/app-project-module 0.104.0 → 0.104.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/storage/index.js +4 -0
- package/package.json +1 -1
package/out/storage/index.js
CHANGED
|
@@ -125,6 +125,10 @@ function createDumpForMigration(config) {
|
|
|
125
125
|
modifiedContent = modifiedContent.replace(/varchar not null primary key/gi, 'varchar primary key');
|
|
126
126
|
// 6. Remove SQLite-specific function replace()
|
|
127
127
|
modifiedContent = modifiedContent.replace(/replace\s*\(\s*'([^']*(?:'{2}[^']*)*)',\s*'\\n',\s*char\s*\(\s*10\s*\)\s*\)/gi, "'$1'");
|
|
128
|
+
// 7. Convert SQLite backticks to PostgreSQL double quotes
|
|
129
|
+
modifiedContent = modifiedContent.replace(/`([^`]+)`/g, '"$1"');
|
|
130
|
+
// 8. Remove VARCHAR length restrictions (VARCHAR(255) -> VARCHAR)
|
|
131
|
+
modifiedContent = modifiedContent.replace(/VARCHAR\(\d+\)/gi, 'VARCHAR');
|
|
128
132
|
fs_1.default.writeFileSync(dumpFilePath, modifiedContent, { encoding: 'utf8', flag: 'w' });
|
|
129
133
|
}
|
|
130
134
|
fs_1.default.renameSync(sqliteFilePath, backupFilePath);
|
package/package.json
CHANGED