-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
migration: every generate include alter geometry column even that column wasn't change #4534
Comments
You need to add the typeorm/src/metadata/ColumnMetadata.ts Line 394 in 7d7fd9f
This makes the migration process think there are changes. @pleerock can you confirm. Thanks |
I'm using: @Column('geometry', { spatialFeatureType: 'Point', srid: 4326 })
@IsNotEmpty()
location: Point and having the same issue. How can i solve it? |
After applied the suggestion from @krazibit , i'm still facing same issue @Column('geometry', { srid: 4326, spatialFeatureType: 'Point' })
coordinates: Point; await queryRunner.query(
`ALTER TABLE "store" ALTER COLUMN "coordinates" TYPE geometry(Point,4326)`,
undefined,
); |
For anyone else looking for a solution to this issue, this was affecting me with Postgres using the following code: @Column({
type: 'point',
spatialFeatureType: 'Point',
srid: 4326,
})
point: string; For whatever reason, changing my column to this fixed the issue for me: import { Point } from 'typeorm';
@Column('geometry', {
spatialFeatureType: 'Point',
srid: 4326,
})
point: Point; Not entirely sure if this is still considered a bug, but it works. |
Issue type:
[ ] question
[ x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[x ]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[ ]
latest
[ ]
@next
[x ]
0.2.18
(or put your version here)Steps to reproduce or a small repository showing the problem:
Entity
Everytime I run
migration:generate
it include the code below to migration script. I have manually delete it insideup
anddown
function.The text was updated successfully, but these errors were encountered: