You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Currently migrations seem to rely on the class name to execute migrations correctly. This causes issues if the mangle option of UglifyJS is enabled, as the class names are mangled. Wouldn't it be possible to use a decorator to define the timestamp instead? E.g:
@Migration(1529582677992)
export class InitialTables implements MigrationInterface {
}
As a workaround I currently pass the migration class names to the reserved option of UglifyJS, which is quite error-prone in the long run:
I would like to avoid using another decorator. What we can do is to add extra optional properties into MigrationInterface that users can implement and use for custom migration name. Feel free to contribute!
I've hit a similar issue with normal relations as well (webpack build).
When EntityMetadataValidator.validateDependencies() is executed in a mangled file, it can happen that there are duplicate identifiers for a particular class as a result of the Function.prototype.name call
p
u
d <--
c
l
y
d <--
(node:31945) UnhandledPromiseRejectionWarning:
CircularRelationsError: Circular relations detected: p -> d -> d.
...
Using keep_fnames: true fixes this and no error is thrown:
UserSpace
Space
Comment
Reaction
PostReaction
Post
User
If a webpack build is being managed by another tool (like create-react-app), it might be almost impossible to override terser's/uglifyjs's configuration.
Issue type:
[ ] question
[ ] bug report
[x] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[x]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[x]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)Currently migrations seem to rely on the class name to execute migrations correctly. This causes issues if the mangle option of UglifyJS is enabled, as the class names are mangled. Wouldn't it be possible to use a decorator to define the timestamp instead? E.g:
As a workaround I currently pass the migration class names to the reserved option of UglifyJS, which is quite error-prone in the long run:
The text was updated successfully, but these errors were encountered: