qbcore-framework / txAdminRecipe

Recipe To Deploy The Build Using txAdmin
35 stars 254 forks source link

Bug TxAdmin #133

Closed ExoskyOfficiel closed 5 months ago

ExoskyOfficiel commented 8 months ago

Je n'arrive pas a creer de base qbcore avec tx admin, il y a une erreur avec le sql je crois

ExoskyOfficiel commented 8 months ago

CREATE TABLE IF NOT EXISTS bank_accounts ( record_id bigint(255) NOT NULL AUTO_INCREMENT, citizenid varchar(250) DEFAULT NULL, business varchar(50) DEFAULT NULL, businessid int(11) DEFAULT NULL, gangid varchar(50) DEFAULT NULL, amount bigint(255) NOT NULL DEFAULT 0, account_type enum('Current','Savings','business','Gang') NOT NULL DEFAULT 'Current', PRIMARY KEY (record_id), UNIQUE KEY citizenid (citizenid), KEY business (business), KEY businessid (businessid), KEY gangid (gangid) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

error sql

ExoskyOfficiel commented 8 months ago

is a real sql

KeeganAI commented 8 months ago

post the error?

RaccoonWX commented 8 months ago

post the error?

The error is indicating that the column users in the bank_accounts table, which is of type longtext, cannot have a default value. Columns of type BLOB, TEXT, GEOMETRY, or JSON cannot have default values in MySQL.

To resolve this issue, you should remove the default value from the users column in the bank_accounts.

Which is referring to this table here.

CREATE TABLE IF NOT EXISTS `bank_accounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `citizenid` varchar(11) DEFAULT NULL,
  `account_name` varchar(50) DEFAULT NULL,
  `account_balance` int(11) NOT NULL DEFAULT 0,
  `account_type` enum('shared','job','gang') NOT NULL,
  `users` longtext DEFAULT '[]',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `account_name` (`account_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

Which I reworked and should POSSIBLY fix this error.

CREATE TABLE IF NOT EXISTS `bank_accounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `citizenid` varchar(11) DEFAULT NULL,
  `account_name` varchar(50) DEFAULT NULL,
  `account_balance` int(11) NOT NULL DEFAULT 0,
  `account_type` enum('shared','job','gang') NOT NULL,
  `users` longtext,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `account_name` (`account_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

Looks to be an older MySQL file, the up-to-date one seems to have this kind of issue currently.

GhzGarage commented 5 months ago

Just pushed the fix for it sorry for the delay