drawdb-io / drawdb

Free, simple, and intuitive online database design tool and SQL generator.
https://drawdb.vercel.app
MIT License
12.09k stars 855 forks source link

An error occurs when executing sql import #64

Closed hwy1782 closed 2 months ago

hwy1782 commented 2 months ago

An error occurs when executing sql import image

page error image

error detail

index-zgz2iI-B.js:454 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'toString')
    at index-zgz2iI-B.js:454:3962
    at Array.forEach (<anonymous>)
    at index-zgz2iI-B.js:454:3611
    at Array.forEach (<anonymous>)
    at OZe (index-zgz2iI-B.js:454:3429)
    at Xn (index-zgz2iI-B.js:465:20027)
    at Object.In [as onOk] (index-zgz2iI-B.js:465:20583)
    at Object.notifyOk (index-zgz2iI-B.js:54:89260)
    at k$e.handleOk (index-zgz2iI-B.js:54:72272)
    at Uy.handleOk (index-zgz2iI-B.js:54:86078)

The sql script is as follows

CREATE TABLE `sssqc` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `station_name` varchar(30) NOT NULL ,
  `rvnm` varchar(30) NOT NULL ,
  `tm` datetime NOT NULL ,
  `rz` float DEFAULT NULL ,
  `otq` float DEFAULT NULL ,
  `rwptn` varchar(10) DEFAULT NULL ,
  `rwptn_name` varchar(10) DEFAULT NULL ,
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ,
  `gmt_modify` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
  PRIMARY KEY (`id`),
  UNIQUE KEY `station_name` (`station_name`,`tm`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ;
1ilit commented 2 months ago

This has been fixed on the fix-import-from-source branch, I'll merge it some time this week