Compare commits
No commits in common. "eed8d36c0b57fdff10561aa3dd8ab4052cac5435" and "21b2bec2c4d19a0b6317f0ba3479cb0b0abb2552" have entirely different histories.
eed8d36c0b
...
21b2bec2c4
3 changed files with 5 additions and 14 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "dblang",
|
"name": "dblang",
|
||||||
"version": "0.9.3",
|
"version": "0.9.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "dblang",
|
"name": "dblang",
|
||||||
"version": "0.9.3",
|
"version": "0.9.2",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mariadb": "^3.0.2",
|
"mariadb": "^3.0.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "dblang",
|
"name": "dblang",
|
||||||
"version": "0.9.3",
|
"version": "0.9.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/db.js",
|
"main": "dist/db.js",
|
||||||
"types": "dist/db.d.ts",
|
"types": "dist/db.d.ts",
|
||||||
|
|
|
@ -126,9 +126,9 @@ export class Handler {
|
||||||
const k = key[i];
|
const k = key[i];
|
||||||
if (
|
if (
|
||||||
((k.REFERENCED_TABLE_NAME ?? k.referenced_table_name) == table
|
((k.REFERENCED_TABLE_NAME ?? k.referenced_table_name) == table
|
||||||
&& (k.REFERENCED_COLUMN_NAME ?? k.referenced_column_name).toLowerCase() == attr.toLowerCase())
|
&& (k.REFERENCED_COLUMN_NAME ?? k.referenced_column_name).toLowerCase() == attr.toLowerCase())
|
||||||
|| (start && (k.TABLE_NAME ?? k.table_name) == table
|
|| (start && (k.TABLE_NAME ?? k.table_name) == table
|
||||||
&& (k.COLUMN_NAME ?? k.column_name).toLowerCase() == attr.toLowerCase() && (k.REFERENCED_COLUMN_NAME ?? k.referenced_column_name) != null)
|
&& (k.COLUMN_NAME ?? k.column_name).toLowerCase() == attr.toLowerCase() && (k.REFERENCED_COLUMN_NAME ?? k.referenced_column_name) != null)
|
||||||
) {
|
) {
|
||||||
del.appendEnding(handler.querys.removeForeignKey(handler, (k.TABLE_NAME ?? k.table_name), (k.CONSTRAINT_NAME ?? k.constraint_name)));
|
del.appendEnding(handler.querys.removeForeignKey(handler, (k.TABLE_NAME ?? k.table_name), (k.CONSTRAINT_NAME ?? k.constraint_name)));
|
||||||
key.splice(i--, 1);
|
key.splice(i--, 1);
|
||||||
|
@ -223,15 +223,6 @@ export class Handler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (changePrimary) for (let j = 0; j < keys.length; j++) {
|
|
||||||
const a = table.dbLangTableAttributes[keys[j]];
|
|
||||||
if (a.ops.autoIncrement) {
|
|
||||||
a.ops.autoIncrement = false;
|
|
||||||
create.appendEnding(handler.querys.changeColumn(handler, a));
|
|
||||||
a.ops.autoIncrement = true;
|
|
||||||
connst.appendEnding(handler.querys.changeColumn(handler, a));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (changePrimary) {
|
if (changePrimary) {
|
||||||
create.appendEnding(handler.querys.removePrimaryKey(handler, table.dbLangTableName));
|
create.appendEnding(handler.querys.removePrimaryKey(handler, table.dbLangTableName));
|
||||||
|
|
Loading…
Reference in a new issue