@ronin/compiler 0.12.8-leo-ron-1071-experimental-265 → 0.12.8-leo-ron-1071-experimental-266

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.
package/dist/index.d.ts CHANGED
@@ -192,7 +192,7 @@ type ModelFieldBasics = {
192
192
  increment?: boolean;
193
193
  };
194
194
  type ModelFieldNormal = ModelFieldBasics & {
195
- type: 'string' | 'number' | 'boolean' | 'date' | 'json';
195
+ type?: 'string' | 'number' | 'boolean' | 'date' | 'json';
196
196
  };
197
197
  type ModelFieldReferenceAction = 'CASCADE' | 'RESTRICT' | 'SET NULL' | 'SET DEFAULT' | 'NO ACTION';
198
198
  type ModelFieldReference = ModelFieldBasics & {
package/dist/index.js CHANGED
@@ -638,7 +638,7 @@ var typesInSQLite = {
638
638
  json: "TEXT"
639
639
  };
640
640
  var getFieldStatement = (models, model, field) => {
641
- let statement = `"${field.slug}" ${typesInSQLite[field.type]}`;
641
+ let statement = `"${field.slug}" ${typesInSQLite[field.type || "string"]}`;
642
642
  if (field.slug === "id") statement += " PRIMARY KEY";
643
643
  if (field.unique === true) statement += " UNIQUE";
644
644
  if (field.required === true) statement += " NOT NULL";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ronin/compiler",
3
- "version": "0.12.8-leo-ron-1071-experimental-265",
3
+ "version": "0.12.8-leo-ron-1071-experimental-266",
4
4
  "type": "module",
5
5
  "description": "Compiles RONIN queries to SQL statements.",
6
6
  "publishConfig": {