You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Importing into a field with a default value for nulls errors for null values.
An error occurred while moving data
cause: column name 'cl_sortkey_prefix' is non-nullable but attempted to set a value of null
A bad row was encountered inserting into table categorylinks (on line 9):
cl_from: 13305
cl_to: Linguistic_morphology
cl_sortkey: MORPHOPHONOLOGY
cl_sortkey_prefix: <nil>
cl_timestamp: 2024-03-12 02:10:51
cl_collation: uppercase
cl_type: page
#!/bin/bash
rm -rf tmp1
mkdir tmp1
cd tmp1
dolt init
dolt sql <<EOF
CREATE TABLE categorylinks (
cl_from int unsigned NOT NULL DEFAULT '0',
cl_to varbinary(255) NOT NULL DEFAULT '',
cl_sortkey varbinary(230) NOT NULL DEFAULT '',
cl_sortkey_prefix varbinary(255) NOT NULL DEFAULT '',
cl_timestamp timestamp NOT NULL,
cl_collation varbinary(32) NOT NULL DEFAULT '',
cl_type enum('page','subcat','file') NOT NULL DEFAULT '1',
PRIMARY KEY (cl_from,cl_to),
KEY cl_collation_ext (cl_collation,cl_to,cl_type,cl_from),
KEY cl_sortkey (cl_to,cl_type,cl_sortkey,cl_from),
KEY cl_timestamp (cl_to,cl_timestamp)
);
EOF
Importing into a field with a default value for nulls errors for null values.
#!/bin/bash
rm -rf tmp1
mkdir tmp1
cd tmp1
dolt init
dolt sql <<EOF
CREATE TABLE categorylinks (
cl_from int unsigned NOT NULL DEFAULT '0',
cl_to varbinary(255) NOT NULL DEFAULT '',
cl_sortkey varbinary(230) NOT NULL DEFAULT '',
cl_sortkey_prefix varbinary(255) NOT NULL DEFAULT '',
cl_timestamp timestamp NOT NULL,
cl_collation varbinary(32) NOT NULL DEFAULT '',
cl_type enum('page','subcat','file') NOT NULL DEFAULT '1',
PRIMARY KEY (cl_from,cl_to),
KEY cl_collation_ext (cl_collation,cl_to,cl_type,cl_from),
KEY cl_sortkey (cl_to,cl_type,cl_sortkey,cl_from),
KEY cl_timestamp (cl_to,cl_timestamp)
);
EOF
cat < test1.csv
cl_from,cl_to,cl_sortkey,cl_sortkey_prefix,cl_timestamp,cl_collation,cl_type
cl_from,cl_to,cl_sortkey,cl_sortkey_prefix,cl_timestamp,cl_collation,cl_type
13303,Communes_of_Tarn-et-Garonne,MONTAUBAN,,2024-03-12 02:10:49,uppercase,page
13303,Pages_with_broken_file_links,MONTAUBAN,,2024-03-12 02:10:49,uppercase,page
13303,Prefectures_in_France,MONTAUBAN,,2024-03-12 02:10:49,uppercase,page
13303,Quercy,MONTAUBAN,,2024-03-12 02:10:49,uppercase,page
13304,Pages_with_broken_file_links,RAIL TRANSPORT MODELLING,,2024-03-12 02:10:50,uppercase,page
13304,Rail_transport_modelling, RAIL TRANSPORT MODELLING, ,2024-03-12 02:10:50,uppercase,page
13305,Linguistic_morphology,MORPHOPHONOLOGY,,2024-03-12 02:10:51,uppercase,page
13305,Morphophonology, MORPHOPHONOLOGY, ,2024-03-12 02:10:51,uppercase,page
13305,Orthography,MORPHOPHONOLOGY,,2024-03-12 02:10:51,uppercase,page
13305,Phonology,MORPHOPHONOLOGY,,2024-03-12 02:10:51,uppercase,page
13306,Glass_applications,MIRROR,,2024-03-12 02:10:52,uppercase,page
EOF
dolt table import -u categorylinks test1.csv
cl_from,cl_to,cl_sortkey,cl_sortkey_prefix,cl_timestamp,cl_collation,cl_type
13303,Communes_of_Tarn-et-Garonne,MONTAUBAN,'',2024-03-12 02:10:49,uppercase,page
13303,Pages_with_broken_file_links,MONTAUBAN,'',2024-03-12 02:10:49,uppercase,page
13303,Prefectures_in_France,MONTAUBAN,'',2024-03-12 02:10:49,uppercase,page
13303,Quercy,MONTAUBAN,'',2024-03-12 02:10:49,uppercase,page
13304,Miniature_railways, RAIL TRANSPORT MODELLING,'',2024-03-12 02:10:50,uppercase,page
13304,Pages_with_broken_file_links,RAIL TRANSPORT MODELLING,'',2024-03-12 02:10:50,uppercase,page
13304,Rail_transport_modelling, RAIL TRANSPORT MODELLING,'',2024-03-12 02:10:50,uppercase,page
13305,Linguistic_morphology,MORPHOPHONOLOGY,'',2024-03-12 02:10:51,uppercase,page
13305,Morphophonology, MORPHOPHONOLOGY,'',2024-03-12 02:10:51,uppercase,page
13305,Orthography,MORPHOPHONOLOGY,'',2024-03-12 02:10:51,uppercase,page
13305,Phonology,MORPHOPHONOLOGY,'',2024-03-12 02:10:51,uppercase,page
13306,Glass_applications,MIRROR,'',2024-03-12 02:10:52,uppercase,page
The text was updated successfully, but these errors were encountered: