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)
Description
PrimaryGeneratedColumn('uuid') generates a VARCHAR(36) mysql column.
One-to-one, one-to-many and many-to-many relations generate VARCHAR(255) columns instead.
Steps to reproduce:
Create the following entities and check the generated DDL.
In version 0.2.18 I'm still seeing an issue related to this when manually adding a userId field to my entity like this:
class Order extends BaseEntity {
@ManyToOne(type => User, user => user.orders)
user: User;
@Column()
userId: string;
}
The id column for User is a varchar(36), however the userId column in this other table becomes varchar(255). This can be overridden by using @Column({ length: 36}), but I guess it makes sense to fix this in typeorm?
Issue type:
[ ] question
[ X ] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ X ]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[ X ]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)Description
PrimaryGeneratedColumn('uuid') generates a VARCHAR(36) mysql column.
One-to-one, one-to-many and many-to-many relations generate VARCHAR(255) columns instead.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: