Comments (1)
I ran across this when I tried making a copy of a table with CURRENT_TIMESTAMP as the default. Here's the code generated by heidi:
CREATE TABLE sample_copy
(
id
INT(10) NOT NULL AUTO_INCREMENT,
name
VARCHAR(50) NOT NULL COLLATE 'utf8mb3_general_ci',
lastedit
TIMESTAMP NOT NULL DEFAULT 'CURRENT_TIMESTAMP' ON UPDATE CURRENT_TIMESTAMP,
notes
JSON NULL DEFAULT NULL,
data
JSON NULL DEFAULT NULL,
PRIMARY KEY (id
) USING BTREE
)
COLLATE='utf8mb3_general_ci'
ENGINE=InnoDB
;
This query will fail because CURRENT_TIMESTAMP is inside single quotes. Remove the quotes and the query will succeed. The lastedit
column should look like this:
`lastedit` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
This appears to be a heidi issue. Making a table copy becomes a two step procedure of creating two queries, one for the table structure and another for the data copy. I filed an issue in the forum but I thought to duplicate here. Not a huge problem but it should be fixed.
from heidisql.
Related Issues (20)
- Outdated plink.exe (SSH Terrapin vulnerability)
- HeidiSQL has spinning cursor after clicking deleted table
- SQL Dump : invisible columns not exported HOT 1
- Please Make UI Elements Hidable
- Make safe/valid CSV export format the default for CSV (x_x) HOT 8
- SQLite text data stored in integer columns displayed right aligned and comma separated HOT 2
- Exporting stored function has double quotes in name which is invalid for MySQL HOT 3
- Startup script is not executed on reconnects
- Weird Vertical Bar in SQL Editor (Multiple Query Bug) HOT 1
- Events Not showing in Tree HOT 4
- Columns indicator on "Data" tab displaying incorrect column count HOT 2
- Create new table copy with TIMESTAMP column give error HOT 1
- Wrong Hungarian transaltions HOT 5
- Access violation on sorting HOT 1
- It would be desirable to have an improved capability for viewing and editing multiple lines of text HOT 1
- App frequently crashes when editing table data HOT 6
- HeidiSQL 12.6.0.6765 OpenSSL 3.1.3 vulnerability
- Tab Icons: Non-selected tab icons appear greyed-out / all the same colour - request for them to always remain in colour. HOT 5
- "Export Database as SQL" doesn't respect Avg_row_length HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heidisql.