Comments (2)
I've submitted a PR that seems to fix the initial issue, but I've found another issue.
indexArray
isn't including @unique indexes.
@Table({
indexes: [
{
unique: true,
fields: ["name", "email"],
name: "example_composite_unique_index"
}
]
})
export class Admin extends Model {
/**
* User full name.
*/
@Unique("unique_admin_name")
@Column(DataType.STRING(256))
declare public name: string;
/**
* User email address.
*/
@AllowNull(false)
@Index("admin_email")
declare public email: string;
}
This results in the following indexesArray
:
[
{ name: 'admin_email', fields: [ [Object] ], type: '', parser: null }
]
from sequelize-typescript.
Related Issues (20)
- Unique property in model definition is not case-sensitive. HOT 1
- `order` property not assignable to `FindOptions` if stored in a variable
- Problem For `Rename Column` With `Keep Rows` in Sequelize
- Associations keys not replaced by include
- Model is error HOT 1
- Cannot use @DefaultScope() simultaneously in two related Models HOT 2
- @Unique and @Column decorators unique constraint name on postgresql/sqlite
- TS error when tried to change createdAt, updatedAt columns type to something else HOT 1
- Support Sequelize.literal on VIRTUAL data type
- setting custom name for foreign key constraint HOT 1
- Vulnerability issue from Snyk scan HOT 3
- Can this project be used with vitest?
- how to hide password when get the model HOT 3
- Failed to create index with @Index Decorator when using table option of undescore:true
- Getting an error when trying to use MySQL POINT type HOT 1
- Adding relation between specified instances and source instance in a M:N relationship with multiple foreign keys not supported
- ModelNotInitializedError: Model not initialized: Member "create" cannot be called [Model] needs to be added to a Sequelize instance. HOT 2
- Why is using soft deletion ineffective
- it only brings me a record in one to many HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sequelize-typescript.