Quantcast
Channel: Installing and upgrading help
Viewing all articles
Browse latest Browse all 47064

Re: 2.5.1 I deleted the column for "city" in mdl_user on MyPHPAdmin...

$
0
0
by Guillermo Madero S..  

Hi Wendi,

As you want the field to be optional, I would do either of the following (assuming that the table prefix is mdl and that the collation is utf8_unicode_ci):

1. Allow null values

ALTER TABLE mdl_user
ADD city VARCHAR(120) NULL
CHARACTER SET utf8 COLLATE utf8_unicode_ci
AFTER address;

2. Do not allow null values but assign a default value (e.g. the one used in the location settings)

ALTER TABLE mdl_user
ADD city VARCHAR(120) NOT NULL
DEFAULT 'Default_City_Value'
CHARACTER SET utf8 COLLATE utf8_unicode_ci
AFTER address;

If I were doing this, I would go with the second option.


Viewing all articles
Browse latest Browse all 47064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>