Skip to content

Instantly share code, notes, and snippets.

View rbideau's full-sized avatar

Raphaël Bideau rbideau

  • Toulouse, FRANCE
View GitHub Profile
@rbideau
rbideau / cloudSettings
Last active September 23, 2020 19:56
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-05-16T07:39:09.034Z","extensionVersion":"v3.2.9"}
@rbideau
rbideau / fix-enum.mjs
Created February 16, 2023 10:25
Fix enum statements in TypeORM migration
#!/usr/bin/env node
// This fix TypeORM enum creation, which generate multiple CREATE TYPE statement
// when an enum is used in multiple columns.
// The solution is taken from this SO answer: https://stackoverflow.com/a/48382296
// which gracefully handle the exception
// - https://github.com/typeorm/typeorm/issues/5648
// - https://github.com/typeorm/typeorm/issues/5738
// - https://github.com/typeorm/typeorm/issues/7501