-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tinyInt #95
Comments
I found, that tinyint(1) is always interpreted as boolean. I change db model... |
You can apply a connection string option to revert this
For example:
According to the documentation:
|
you can also set TreatTinyAsBoolean by using MySqlConnectionStringBuilder object |
I have a simple datatable. One column is tinyInt 1.
All exported rows has value 1 - but original data has 1,2,3... Why are the dump incorrect? What I have wrong?
output:
DROP TABLE IF EXISTS
urop_degree
;CREATE TABLE IF NOT EXISTS
urop_degree
(id
int(11) NOT NULL AUTO_INCREMENT,degree
char(50) NOT NULL DEFAULT '',sequence
tinyint(3) DEFAULT NULL,lodge
tinyint(1) NOT NULL DEFAULT '0',picture
char(50) DEFAULT NULL,active
tinyint(1) NOT NULL DEFAULT '1',svetlo1_c
tinyint(3) unsigned DEFAULT NULL,svetlo1_vc
tinyint(3) unsigned DEFAULT NULL,svetlo2_c
tinyint(3) unsigned DEFAULT NULL,svetlo2_vc
tinyint(3) unsigned DEFAULT NULL,svetlo3_c
tinyint(3) unsigned DEFAULT NULL,svetlo3_vc
tinyint(3) unsigned DEFAULT NULL,svetlo4_c
tinyint(3) unsigned DEFAULT NULL,svetlo4_vc
tinyint(3) unsigned DEFAULT NULL,navic_c
tinyint(3) unsigned DEFAULT NULL,navic_vc
tinyint(3) unsigned DEFAULT NULL,svetlo1_op
tinyint(3) unsigned DEFAULT NULL,svetlo2_op
tinyint(3) unsigned DEFAULT NULL,svetlo3_op
tinyint(3) unsigned DEFAULT NULL,svetlo4_op
tinyint(3) unsigned DEFAULT NULL,navic_op
tinyint(3) unsigned DEFAULT NULL,text
text,PRIMARY KEY (
id
),KEY
sequence
(sequence
)) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=cp1250 ROW_FORMAT=FIXED;
--
-- Dumping data for table urop_degree
/*!40000 ALTER TABLE
urop_degree
DISABLE KEYS /;INSERT INTO
urop_degree
(id
,degree
,lodge
) VALUES(1,'Sagamor Čikala',1),
(2,'Orlí Sagamor Čikala',1),
(4,'Sagamor',1),
/!40000 ALTER TABLE
urop_degree
ENABLE KEYS */;origin data:
INSERT INTO
urop_degree
VALUES ('Sagamor Čikala', 5, 2, 'ml_sagamor_cikala.gif', 1, 6, 0, 6, 0, 6, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Je ten, kdo je starý 14 let (hranice může být náčelníkem kmene snížena).');INSERT INTO
urop_degree
VALUES ('Orlí Sagamor Čikala', 6, 2, 'ml_orli_sagamor_cikala.gif', 1, 6, 0, 6, 0, 6, 0, 6, 0, 12, 0, 0, 0, 0, 0, 0, NULL);INSERT INTO
urop_degree
VALUES ('Sagamor', 3, 1, 'vl_sagamor.gif', 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 0, NULL);The text was updated successfully, but these errors were encountered: