@aceitadev/adatabase 0.8.0 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -221,7 +221,10 @@ class SchemaManager {
221
221
  continue;
222
222
  }
223
223
  let sqlType = this.getSqlTypeForClass(type);
224
- if (type === Number && opts.decimal) {
224
+ if (opts === null || opts === void 0 ? void 0 : opts.text) {
225
+ sqlType = "TEXT";
226
+ }
227
+ else if (type === Number && opts.decimal) {
225
228
  if (Array.isArray(opts.decimal) && opts.decimal.length === 2) {
226
229
  sqlType = `DECIMAL(${opts.decimal[0]},${opts.decimal[1]})`;
227
230
  }
@@ -5,6 +5,7 @@ export type ColumnOptions = {
5
5
  adapter?: new () => ColumnAdapter;
6
6
  unique?: boolean;
7
7
  limit?: number;
8
+ text?: boolean;
8
9
  type?: any;
9
10
  index?: boolean;
10
11
  decimal?: boolean | [number, number];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aceitadev/adatabase",
3
- "version": "0.8.0",
3
+ "version": "0.8.5",
4
4
  "description": "Uma biblioteca para facilitar a interação com bancos de dados MySQL e PostgreSQL em projetos TypeScript/Node.js.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",