mango-orm 1.0.0 → 1.0.1

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/src/mango.js CHANGED
@@ -183,7 +183,7 @@ class MangoTable {
183
183
  if (Array.from(name.split(" ")).length > 1) {
184
184
  throw new Error("No spaces in table name allowed:");
185
185
  }
186
- this.tableName = name;
186
+ this.tableName = name.toLowerCase();
187
187
  this.tableFields = [...fields]; // Clone to prevent external mutations
188
188
  // Initialize query executor
189
189
  // this.query = new MangoQuery();
@@ -696,9 +696,10 @@ class Mango {
696
696
  return table;
697
697
  }
698
698
  async dropTable(name) {
699
+ // Find and remove from tables array first
699
700
  for (let i = 0; i < this.tables.length; i++) {
700
- if (this.tables[i].getName() === name) {
701
- this.query.query = "DROP TABLE " + name;
701
+ if (this.tables[i].getName() === name.toLowerCase()) {
702
+ this.query.query = "DROP TABLE " + name.toLowerCase();
702
703
  await this.query.execute();
703
704
  this.query.query = "";
704
705
  this.tables.splice(i, 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mango-orm",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "A lightweight, type-safe MySQL ORM for Node.js and TypeScript",
6
6
  "main": "dist/src/mango.js",