Database is not importing giving following error - mysql

I am trying to import a database file on local server using wamp . I am getting following error. How this can be resolved, Thank you for all your help
SQL query:
CREATE TABLE IF NOT EXISTS `wp_bwg_theme` (
`id` bigint(20) NOT NULL,
`name` varchar(255) NOT NULL,
`thumb_margin` int(4) NOT NULL,
`thumb_padding` int(4) NOT NULL,
`thumb_border_radius` varchar(32) NOT NULL,
`thumb_border_width` int(4) NOT NULL,
`thumb_border_style` varchar(16) NOT NULL,
`thumb_border_color` varchar(8) NOT NULL,
`thumb_bg_color` varchar(8) NOT NULL,
`thumbs_bg_color` varchar(8) NOT NULL,
`thumb_bg_transparent` int(4) NOT NULL,
`thumb_box_shadow` varchar(32) NOT NULL,
`thumb_transparent` int(4) NOT NULL,
`thumb_align` varchar(8) NOT NULL,
`thumb_hover_effect` varchar(128) NOT NULL,
`thumb_hover_effect_value` varchar(128) NOT NULL,
`thumb_transition` tinyint(1) NOT NULL,
`thumb_title_font_color` varchar(8) NOT NULL,
`thumb_title_font_style` varchar(16) NOT NULL,
`thumb_title_pos` varchar(8) NOT NULL,
`thumb_title_font_size` int(4) NOT NULL,
`thumb_title_font_weight` varchar(8) NOT NULL,
`thumb_title_margin` varchar(32) NOT N[...]
MySQL said: Documentation
1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

Related

prevent django test runner from creating stale table

I have mariadb database that used to have CHARSET utf8 COLLATE utf8_general_ci config but now CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci. All tables have the same CHARSET and COLLATE as those of the database.
When I run ./manage.py test, stacktrace looks like this:
....
django.db.utils.OperationalError: (1118, 'Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.')
I managed to find out what the troubling table is, and the sql query looks like the following. Note that I changed names of table and fields for security:
CREATE TABLE `troubling_table`
(
`id` INTEGER auto_increment NOT NULL PRIMARY KEY,
`no_tax` VARCHAR(20) NOT NULL,
`cd_pc` VARCHAR(7) NOT NULL,
`cd_wdept` VARCHAR(12) NOT NULL,
`id_write` VARCHAR(20) NULL,
`cd_docu` VARCHAR(10) NULL,
`dt_acct` VARCHAR(8) NULL,
`st_docu` VARCHAR(3) NULL,
`tp_drcr` VARCHAR(3) NULL,
`cd_acct` VARCHAR(20) NULL,
`amt` NUMERIC(19, 4) NULL,
`cd_partner` VARCHAR(20) NULL,
`nm_partner` VARCHAR(50) NULL,
`tp_job` VARCHAR(40) NULL,
`cls_job` VARCHAR(40) NULL,
`ads_hd` VARCHAR(400) NULL,
`nm_ceo` VARCHAR(40) NULL,
`dt_start` VARCHAR(8) NULL,
`dt_end` VARCHAR(8) NULL,
`am_taxstd` NUMERIC(19, 4) NULL,
`am_addtax` NUMERIC(19, 4) NULL,
`tp_tax` VARCHAR(10) NULL,
`no_company` VARCHAR(20) NULL,
`dts_insert` VARCHAR(20) NULL,
`id_insert` VARCHAR(20) NULL,
`dts_update` VARCHAR(20) NULL,
`id_update` VARCHAR(20) NULL,
`nm_note` VARCHAR(100) NULL,
`cd_bizarea` VARCHAR(12) NULL,
`cd_dept` VARCHAR(12) NULL,
`cd_cc` VARCHAR(12) NULL,
`cd_pjt` VARCHAR(20) NULL,
`cd_fund` VARCHAR(20) NULL,
`cd_budget` VARCHAR(20) NULL,
`no_cash` VARCHAR(20) NULL,
`st_mutual` VARCHAR(3) NULL,
`cd_card` VARCHAR(20) NULL,
`no_deposit` VARCHAR(20) NULL,
`cd_bank` VARCHAR(20) NULL,
`ucd_mng1` VARCHAR(20) NULL,
`ucd_mng2` VARCHAR(20) NULL,
`ucd_mng3` VARCHAR(20) NULL,
`ucd_mng4` VARCHAR(20) NULL,
`ucd_mng5` VARCHAR(20) NULL,
`cd_employ` VARCHAR(20) NULL,
`cd_mng` VARCHAR(20) NULL,
`no_bdocu` VARCHAR(20) NULL,
`no_bdoline` NUMERIC(4, 0) NULL,
`tp_docu` VARCHAR(3) NULL,
`no_acct` NUMERIC(5, 0) NULL,
`tp_trade` VARCHAR(10) NULL,
`no_check` VARCHAR(20) NULL,
`no_check1` VARCHAR(20) NULL,
`cd_exch` VARCHAR(10) NULL,
`rt_exch` NUMERIC(10, 4) NULL,
`cd_trade` VARCHAR(10) NULL,
`no_check2` VARCHAR(50) NULL,
`no_check3` VARCHAR(50) NULL,
`no_check4` VARCHAR(100) NULL,
`tp_cross` VARCHAR(1) NULL,
`erp_cd` VARCHAR(50) NULL,
`am_ex` NUMERIC(19, 4) NULL,
`tp_export` VARCHAR(1) NULL,
`no_to` VARCHAR(20) NULL,
`dt_shipping` VARCHAR(8) NULL,
`tp_gubun` VARCHAR(3) NULL,
`no_invoice` VARCHAR(20) NULL,
`no_item` VARCHAR(20) NULL,
`md_tax1` VARCHAR(4) NULL,
`nm_item1` VARCHAR(50) NULL,
`nm_size1` VARCHAR(20) NULL,
`qt_tax1` NUMERIC(17, 4) NULL,
`am_prc1` NUMERIC(19, 4) NULL,
`am_supply1` NUMERIC(19, 4) NULL,
`am_tax1` NUMERIC(19, 4) NULL,
`nm_note1` VARCHAR(20) NULL,
`cd_bizplan` VARCHAR(20) NULL,
`cd_bgacct` VARCHAR(10) NULL,
`cd_mngd1` VARCHAR(20) NULL,
`nm_mngd1` VARCHAR(100) NULL,
`cd_mngd2` VARCHAR(20) NULL,
`nm_mngd2` VARCHAR(100) NULL,
`cd_mngd3` VARCHAR(20) NULL,
`nm_mngd3` VARCHAR(100) NULL,
`cd_mngd4` VARCHAR(20) NULL,
`nm_mngd4` VARCHAR(100) NULL,
`cd_mngd5` VARCHAR(20) NULL,
`nm_mngd5` VARCHAR(100) NULL,
`cd_mngd6` VARCHAR(20) NULL,
`nm_mngd6` VARCHAR(100) NULL,
`cd_mngd7` VARCHAR(20) NULL,
`nm_mngd7` VARCHAR(100) NULL,
`cd_mngd8` VARCHAR(20) NULL,
`nm_mngd8` VARCHAR(100) NULL,
`yn_iss` VARCHAR(1) NULL,
`final_status` VARCHAR(2) NULL,
`no_bill` VARCHAR(24) NULL,
`tp_bill` VARCHAR(1) NULL,
`tp_record` VARCHAR(1) NULL,
`tp_etcacct` VARCHAR(1) NULL,
`st_gware` VARCHAR(3) NULL,
`sell_dam_nm` VARCHAR(30) NULL,
`sell_dam_email` VARCHAR(50) NULL,
`sell_dam_mobil` VARCHAR(20) NULL,
`nm_pumm` VARCHAR(100) NULL,
`jeonjasend15_yn` VARCHAR(1) NULL,
`dt_write` VARCHAR(8) NULL,
`st_tax` VARCHAR(1) NULL,
`md_tax2` VARCHAR(4) NULL,
`nm_item2` VARCHAR(50) NULL,
`nm_size2` VARCHAR(20) NULL,
`qt_tax2` NUMERIC(17, 4) NULL,
`am_prc2` NUMERIC(19, 4) NULL,
`am_supply2` NUMERIC(19, 4) NULL,
`am_tax2` NUMERIC(19, 4) NULL,
`nm_note2` VARCHAR(20) NULL,
`md_tax3` VARCHAR(4) NULL,
`nm_item3` VARCHAR(50) NULL,
`nm_size3` VARCHAR(20) NULL,
`qt_tax3` NUMERIC(17, 4) NULL,
`am_prc3` NUMERIC(19, 4) NULL,
`am_supply3` NUMERIC(19, 4) NULL,
`am_tax3` NUMERIC(19, 4) NULL,
`nm_note3` VARCHAR(20) NULL,
`md_tax4` VARCHAR(4) NULL,
`nm_item4` VARCHAR(50) NULL,
`nm_size4` VARCHAR(20) NULL,
`qt_tax4` NUMERIC(17, 4) NULL,
`am_prc4` NUMERIC(19, 4) NULL,
`am_supply4` NUMERIC(19, 4) NULL,
`am_tax4` NUMERIC(19, 4) NULL,
`nm_note4` VARCHAR(20) NULL,
`no_asset` VARCHAR(20) NULL,
`nm_bigo` VARCHAR(100) NULL,
`nm_ptr` VARCHAR(20) NULL,
`ex_hp` VARCHAR(15) NULL,
`ex_emil` VARCHAR(100) NULL,
`no_biztax` VARCHAR(8) NULL,
`yn_import` VARCHAR(1) NULL,
`ref_no_docu` VARCHAR(20) NULL,
`cd_fx` VARCHAR(2) NULL,
`fx_bill` VARCHAR(20) NULL,
`no_iss` VARCHAR(24) NULL,
`file_attach` VARCHAR(100) NULL,
`tp_evidence` VARCHAR(4) NULL,
`st_bizbox` VARCHAR(1) NULL,
`tp_input` VARCHAR(30) NULL,
`sell_dam_tel` VARCHAR(20) NULL,
`no_car` VARCHAR(20) NULL,
`no_carbody` VARCHAR(17) NULL,
`dec_lease` VARCHAR(100) NULL,
`no_tdocu` VARCHAR(20) NULL,
`no_tdoline` NUMERIC(4, 0) NULL,
`cd_bizcar` VARCHAR(20) NULL,
`cd_taxacct` VARCHAR(10) NULL,
`yn_fixasset` VARCHAR(1) NULL
)
So if I run this query in sql editor, the error looks the same as that of django. This error didn't happend when I created database with the now gone pair of characterset and collate. But when I run the test it raises error. Different charset may be one of the reaons.
So I deleted the model and apply migrations, since that model is no longer in use. So, stale.
But even after that model is erased, django test runner still seems to bother to create that stale table.
Does django test runner go through every migraion files from start? Is that why I can't run test against model that used to be created with old charset and collate?
How can I prevent django test runner from creating stale, no longer existed, table because old table conflicts in charset and collate with new table, without changing db charset and collate?

Create Table mySql syntax error (working on other versions)

When creating a table in MySQL Version 5.7.21 on a Linux server I get the following error message:
" You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near arbeitstageprowocheab date DEFAULT NULL,
urlaubstageprojahr int(3) DEFAULT '"
when creating the following table:
CREATE TABLE arbeitsvertragsdaten (
personalnummer int(11) NOT NULL,
mailadresse varchar(50) DEFAULT NULL,
handynummerxenium varchar(50) DEFAULT NULL,
status varchar(20) DEFAULT NULL,
position varchar(50) DEFAULT NULL,
probezeitende date DEFAULT NULL,
wochenarbeitszeit int(11) DEFAULT NULL,
wochenarbeitszeitab date DEFAULT NULL,
teilzeitbefristet tinyint(1) DEFAULT NULL,
teilzeitende date DEFAULT NULL,
ueberstundenquotient double DEFAULT NULL,
arbeitstageprowoche int(11) DEFAULT NULL,
arbeitstageprowocheab date DEFAULT NULL,
urlaubstageprojahr int(3) DEFAULT NULL,
urlaubstageprojahrab date DEFAULT NULL,
mutterschutzbeginn date DEFAULT NULL,
mutterschutzende date DEFAULT NULL,
elternzeitbeginn date DEFAULT NULL,
elternzeitende date DEFAULT NULL);
It did work on my local machine for development on Version 8.0.16 (Community Server)
Any ideas whats wrong with my syntax?
There is syntax issue.
CREATE TABLE `arbeitsvertragsdaten` (
`personalnummer` int(11) NOT NULL,
`mailadresse` varchar(50) DEFAULT NULL,
`handynummerxenium` varchar(50) DEFAULT NULL,
`status` varchar(20) DEFAULT NULL,
`position` varchar(50) DEFAULT NULL,
`probezeitende` date DEFAULT NULL,
`wochenarbeitszeit` int(11) DEFAULT NULL,
`wochenarbeitszeitab` date DEFAULT NULL,
`teilzeitbefristet` tinyint(1) DEFAULT NULL,
`teilzeitende` date DEFAULT NULL,
`ueberstundenquotient` double DEFAULT NULL,
`arbeitstageprowoche` int(11) DEFAULT NULL,
`arbeitstageprowocheab` date DEFAULT NULL,
`urlaubstageprojahr` int(3) DEFAULT NULL,
`urlaubstageprojahrab` date DEFAULT NULL,
`mutterschutzbeginn` date DEFAULT NULL,
`mutterschutzende` date DEFAULT NULL,
`elternzeitbeginn` date DEFAULT NULL,
`elternzeitende` date DEFAULT NULL
); ----- here ) is missing.

How can I export and import a view into table different databases

I am trying to export a view from database X to import that into a table on database Y, but I can't do that because some fields are INT an when I try to export the values, blank fields still blank, it is not comming NULL, but if I change that to NULL value, when I try to upload it is bringing the error:
- Row import failed with error: ("Incorrect integer value: '' for column 'id_genero_musical' at row 1", 1366)
If I try to import this file without a table created, it is doing the wrong way because the type of the fields is showing all wrong, as TEXT, and INT, just those two types.
My table:
CREATE TABLE `emissora` (
`id_emissora` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ds_nome` varchar(100) NOT NULL,
`id_tipo_emissora` tinyint(4) DEFAULT NULL,
`ds_modulacao` varchar(20) NOT NULL,
`ds_frequencia` varchar(10) NOT NULL,
`nr_alcance` int(3) DEFAULT NULL,
`perc_alcance` decimal(5,2) DEFAULT NULL,
`qt_habitantes_alcance` varchar(20) DEFAULT NULL,
`ds_url` varchar(100) DEFAULT NULL,
`ds_streaming` varchar(255) DEFAULT NULL,
`ds_id_anatel` varchar(100) DEFAULT NULL,
`id_uf` int(11) DEFAULT NULL,
`ds_uf` varchar(100) DEFAULT NULL,
`id_municipio` int(10) DEFAULT NULL,
`ds_municipio` varchar(100) DEFAULT NULL,
`id_regiao` int(11) DEFAULT NULL,
`id_genero_musical` int(11) DEFAULT NULL,
PRIMARY KEY (`id_emissora`)
) ENGINE=InnoDB AUTO_INCREMENT=11129 DEFAULT CHARSET=utf8;
And this query below is what the file is automatic creating:
CREATE TABLE `emissora_bkp` (
`id_emissora` int(11) DEFAULT NULL,
`ds_nome` text DEFAULT NULL,
`id_tipo_emissora` text DEFAULT NULL,
`ds_modulacao` text DEFAULT NULL,
`ds_frequencia` double DEFAULT NULL,
`nr_alcance` int(11) DEFAULT NULL,
`perc_alcance` text DEFAULT NULL,
`qt_habitantes_alcance` text DEFAULT NULL,
`ds_url` text DEFAULT NULL,
`ds_streaming` text DEFAULT NULL,
`ds_id_anatel` text DEFAULT NULL,
`id_uf` int(11) DEFAULT NULL,
`ds_uf` text DEFAULT NULL,
`id_municipio` int(11) DEFAULT NULL,
`ds_municipio` text DEFAULT NULL,
`id_regiao` int(11) DEFAULT NULL,
`id_genero_musical` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
the CSV file is something like this:
id_emissora,ds_nome,id_tipo_emissora,ds_modulacao,ds_frequencia,nr_alcance,perc_alcance,qt_habitantes_alcance,ds_url,ds_streaming,ds_id_anatel,id_uf,ds_uf,id_municipio,ds_municipio,id_regiao,id_genero_musical
4,Cultura,null,FM,102.5,0,null,null,http://www.cultura.fm.br/,,null,16,PR,2969,Cultura,5,null
6,Abdallah,null,FM,104.1,55,null,null,http://www.abdallahfm.com.br/,http://server3.webradios.com.br:9338/9338,57dbac33ef411,16,PR,2911,Abdallah,5,3
7,Aline,null,FM,93.7,0,null,null,http://www.alinefm.com.br,http://controleflash.omegasistemas.net:8356/;stream.mp3,57dbac367dbbc,16,PR,3147,Aline,5,3
8,Amiga,null,FM,101.3,40,null,null,http://www.amiga101.com.br,http://stream4.painelvox.com.br:7052,57dbac337965d,16,PR,2878,Amiga,5,3
I am using MySQL workbench.

MySQL create table script with keys

I'm trying to execute this script on MySQL Server (installed on a VM with Ubuntu Server 64bit)
CREATE TABLE `MAINTABLEPARTS` (
`NAME_PARTS` varchar(300) NOT NULL,
`BRAND` varchar(60) NOT NULL,
`CODE_PART` varchar(105) NOT NULL,
`CODE_PARTS_ADVANCED` varchar(150) NOT NULL,
`CODE_PARTS_USERNUMBER` varchar(150) NOT NULL,
`EAN` varchar(13) DEFAULT NULL,
`STATUSPRODUCT` varchar(300) DEFAULT NULL,
`NAME_IMAGE` varchar(300) DEFAULT NULL,
`TTC_ART_ID` int(11) NOT NULL,
`ADDITIONAL_DATA` text,
PRIMARY KEY (`TTC_ART_ID`),
KEY (`BRAND`, `CODE_PART`, `EAN`)
KEY (`BRAND`, `CODE_PARTS_USERNUMBER`)
)
The problem is that I get an error in the query when I execute it...(something about the sql version).... the script above is automatically generated so I did not write it myself. Any ideas what might could be wrong ? If you need any further information please let me know...(MySQL version 5.7.15, query executed from MySQL Front v5.4 - build 4.148)
You are missing a comma here
CREATE TABLE `MAINTABLEPARTS` (
`NAME_PARTS` varchar(300) NOT NULL,
`BRAND` varchar(60) NOT NULL,
`CODE_PART` varchar(105) NOT NULL,
`CODE_PARTS_ADVANCED` varchar(150) NOT NULL,
`CODE_PARTS_USERNUMBER` varchar(150) NOT NULL,
`EAN` varchar(13) DEFAULT NULL,
`STATUSPRODUCT` varchar(300) DEFAULT NULL,
`NAME_IMAGE` varchar(300) DEFAULT NULL,
`TTC_ART_ID` int(11) NOT NULL,
`ADDITIONAL_DATA` text,
PRIMARY KEY (`TTC_ART_ID`),
KEY (`BRAND`, `CODE_PART`, `EAN`),
---------------------------------^
KEY (`BRAND`, `CODE_PARTS_USERNUMBER`)
)

mysql spring data error (QUERY) [duplicate]

This question already has an answer here:
Syntax error due to using a reserved word as a table or column name in MySQL
(1 answer)
Closed 8 years ago.
I made this using Spring Data. I can't figure whats the problem with this sql statement.This query was auto generated by Spring data.
It says.
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'database bit not null, designation
varchar(255), equipment varchar(255), hardwar' at line 1
My query:
create table joborder (id bigint not null auto_increment,
barPrinter bit not null,
birPermit bit not null,
cabling bit not null,
cashDrawer bit not null,
cashierPrinter bit not null,
ccccods bit not null,
configuration bit not null,
cpu bit not null,
database bit not null,
designation varchar(255),
equipment varchar(255),
hardwareActionTaken varchar(255),
hardwareOthers bit not null,
hardwareRemarks varchar(255),
invoiceNumber varchar(255),
keyboard bit not null,
kitchenPrinter bit not null,
logNumber varchar(255),
magneticCardReader bit not null,
mallInterface bit not null,
menu bit not null,
monitor bit not null,
mouse bit not null,
operatingSystem bit not null,
othersActionTaken varchar(255),
othersOthers bit not null,
othersRemarks varchar(255),
powerSupply bit not null,
reportProblemTask varchar(255),
scanner bit not null,
softwareActionTaken varchar(255),
softwareOthers bit not null,
softwareRemarks varchar(255),
storeLocation varchar(255),
storeRepresentative varchar(255),
technician varchar(255),
timeIn varchar(255),
timeOut varchar(255),
transightECLM bit not null,
transightHQ bit not null,
transightPOS bit not null,
uat bit not null,
store_id bigint,
primary key (id))
Use this query
CREATE TABLE `joborder` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`barPrinter` BIT(1) NOT NULL,
`birPermit` BIT(1) NOT NULL,
`cabling` BIT(1) NOT NULL,
`cashDrawer` BIT(1) NOT NULL,
`cashierPrinter` BIT(1) NOT NULL,
`ccccods` BIT(1) NOT NULL,
`configuration` BIT(1) NOT NULL,
`cpu` BIT(1) NOT NULL,
`database` BIT NOT NULL,
`designation` VARCHAR(255) DEFAULT NULL,
`equipment` VARCHAR(255) DEFAULT NULL,
`hardwareActionTaken` VARCHAR(255) DEFAULT NULL,
`hardwareOthers` BIT(1) NOT NULL,
`hardwareRemarks` VARCHAR(255) DEFAULT NULL,
`invoiceNumber` VARCHAR(255) DEFAULT NULL,
`keyboard` BIT(1) NOT NULL,
`kitchenPrinter` BIT(1) NOT NULL,
`logNumber` VARCHAR(255) DEFAULT NULL,
`magneticCardReader` BIT(1) NOT NULL,
`mallInterface` BIT(1) NOT NULL,
`menu` BIT(1) NOT NULL,
`monitor` BIT(1) NOT NULL,
`mouse` BIT(1) NOT NULL,
`operatingSystem` BIT(1) NOT NULL,
`othersActionTaken` VARCHAR(255) DEFAULT NULL,
`othersOthers` BIT(1) NOT NULL,
`othersRemarks` VARCHAR(255) DEFAULT NULL,
`powerSupply` BIT(1) NOT NULL,
`reportProblemTask` VARCHAR(255) DEFAULT NULL,
`scanner` BIT(1) NOT NULL,
`softwareActionTaken` VARCHAR(255) DEFAULT NULL,
`softwareOthers` BIT(1) NOT NULL,
`softwareRemarks` VARCHAR(255) DEFAULT NULL,
`storeLocation` VARCHAR(255) DEFAULT NULL,
`storeRepresentative` VARCHAR(255) DEFAULT NULL,
`technician` VARCHAR(255) DEFAULT NULL,
`timeIn` VARCHAR(255) DEFAULT NULL,
`timeOut` VARCHAR(255) DEFAULT NULL,
`transightECLM` BIT(1) NOT NULL,
`transightHQ` BIT(1) NOT NULL,
`transightPOS` BIT(1) NOT NULL,
`uat` BIT(1) NOT NULL,
`store_id` BIGINT(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=latin1;
Database is a reserved keyword
you have to use like this Databse
Try this
create table joborder (id bigint not null auto_increment,
barPrinter bit not null,
birPermit bit not null,
cabling bit not null,
cashDrawer bit not null,
cashierPrinter bit not null,
ccccods bit not null,
configuration bit not null,
cpu bit not null,
`database` bit not null,
designation varchar(255),
equipment varchar(255),
hardwareActionTaken varchar(255),
hardwareOthers bit not null,
hardwareRemarks varchar(255),
invoiceNumber varchar(255),
keyboard bit not null,
kitchenPrinter bit not null,
logNumber varchar(255),
magneticCardReader bit not null,
mallInterface bit not null,
menu bit not null,
monitor bit not null,
mouse bit not null,
operatingSystem bit not null,
othersActionTaken varchar(255),
othersOthers bit not null,
othersRemarks varchar(255),
powerSupply bit not null,
reportProblemTask varchar(255),
scanner bit not null,
softwareActionTaken varchar(255),
softwareOthers bit not null,
softwareRemarks varchar(255),
storeLocation varchar(255),
storeRepresentative varchar(255),
technician varchar(255),
timeIn varchar(255),
timeOut varchar(255),
transightECLM bit not null,
transightHQ bit not null,
transightPOS bit not null,
uat bit not null,
store_id bigint,
primary key (id))
you should try this: and check this (http://sqlfiddle.com/#!2/4817b)
CREATE TABLE joborder
(
id BIGINT(20) NOT NULL AUTO_INCREMENT,
barPrinter BIT(1) NOT NULL,
birPermit BIT(1) NOT NULL,
cabling BIT(1) NOT NULL,
cashDrawer BIT(1) NOT NULL,
cashierPrinter BIT(1) NOT NULL,
ccccods BIT(1) NOT NULL,
configuration BIT(1) NOT NULL,
cpu BIT(1) NOT NULL,
`database` BIT NOT NULL,
designation VARCHAR(255) DEFAULT NULL,
equipment VARCHAR(255) DEFAULT NULL,
hardwareActionTaken VARCHAR(255) DEFAULT NULL,
hardwareOthers BIT(1) NOT NULL,
hardwareRemarks VARCHAR(255) DEFAULT NULL,
invoiceNumber VARCHAR(255) DEFAULT NULL,
keyboard BIT(1) NOT NULL,
kitchenPrinter BIT(1) NOT NULL,
logNumber VARCHAR(255) DEFAULT NULL,
magneticCardReader BIT(1) NOT NULL,
mallInterface BIT(1) NOT NULL,
menu BIT(1) NOT NULL,
monitor BIT(1) NOT NULL,
mouse BIT(1) NOT NULL,
operatingSystem BIT(1) NOT NULL,
othersActionTaken VARCHAR(255) DEFAULT NULL,
othersOthers BIT(1) NOT NULL,
othersRemarks VARCHAR(255) DEFAULT NULL,
powerSupply BIT(1) NOT NULL,
reportProblemTask VARCHAR(255) DEFAULT NULL,
scanner BIT(1) NOT NULL,
softwareActionTaken VARCHAR(255) DEFAULT NULL,
softwareOthers BIT(1) NOT NULL,
softwareRemarks VARCHAR(255) DEFAULT NULL,
storeLocation VARCHAR(255) DEFAULT NULL,
storeRepresentative VARCHAR(255) DEFAULT NULL,
technician VARCHAR(255) DEFAULT NULL,
timeIn VARCHAR(255) DEFAULT NULL,
timeOut VARCHAR(255) DEFAULT NULL,
transightECLM BIT(1) NOT NULL,
transightHQ BIT(1) NOT NULL,
transightPOS BIT(1) NOT NULL,
uat BIT(1) NOT NULL,
store_id BIGINT(20) DEFAULT NULL,
PRIMARY KEY (`id`)
)
ENGINE=INNODB DEFAULT CHARSET=latin1;