Skip to content
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

When re-running a migration with SequelizeStorage it throws SequelizeUniqueConstraintError #601

Closed
mau31415 opened this issue Apr 17, 2023 · 2 comments

Comments

@mau31415
Copy link
Contributor

The SequelizeStorage contains this model:

		return this.sequelize.define(
			this.modelName,
			{
				[this.columnName]: {
					type: this.columnType,
					allowNull: false,
					unique: true,
					primaryKey: true,
					autoIncrement: false,
				},
			},
			{
				tableName: this.tableName,
				schema: this.schema,
				timestamps: this.timestamps,
				charset: 'utf8',
				collate: 'utf8_unicode_ci',
			}
		) as ModelClassType;
	}

which implies migration can be added only once however Re-running migration should add it twice.

@mau31415
Copy link
Contributor Author

#602

@mmkal
Copy link
Contributor

mmkal commented Nov 4, 2023

thanks @mau31415

@mmkal mmkal closed this as completed Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants