Change the default value of a string column to real uuid()
1
vote
4
answers
5467
views
When I use
show create table Posts
I see this column:
Slug
varchar(400) NOT NULL DEFAULT 'uuid()'
This means that the default value is a string. I want the default string to be a real uuid()
function.
I want it to become:
Slug
varchar(400) NOT NULL DEFAULT uuid()
How can I do that? What query should I write for this? No matter what I do inside the phpMyAdmin or Adminer it does not become what I want.
---
I have a column that has 'uuid()'
as its default value. I want to change to so that it becomes uuid()
. I don't want to create a new column. I don't want to drop the column and recreate it. I want to modify it.
Asked by Mohammad Miras
(159 rep)
Apr 26, 2023, 11:15 AM
Last activity: Jun 15, 2024, 07:38 AM
Last activity: Jun 15, 2024, 07:38 AM