Opened 6 years ago
Closed 5 years ago
#44856 closed enhancement (invalid)
does remove database column(field) in each update core?
Reported by: | hamedmoodi | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Database | Keywords: | |
Focuses: | Cc: |
Description
Hi
My data in user table in database is huge and i want to add some column to wp_users table for light query such as birthday, sex and so on.
Is posible in wordpress update remove this fields and data in future?
Sorry, i do not know where i should this type of quetions and set category to "enhancement"
Thanks
Change History (6)
#1
@
6 years ago
- Component changed from General to Users
- Focuses performance added
- Keywords close added
#2
@
6 years ago
Ok thanks
You said does not remove user "meta".
I want to know does it remove Extra field for users table or post table in database?
Thanks again
#3
@
6 years ago
Adding a column to wp_posts and wp_users will probably not cause a problem for small upgrades but may cause problems for the WP upgrade with DB upgrade but probably would remove your column! I believe it would remove the additional column from tables.
#6
@
5 years ago
- Keywords close removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
You can certainly add custom columns to your table: WordPress won't remove columns when upgrading. It'd be a good idea to prefix your column names with something unique (eg, myplugin_birthday
, rather than just birthday
), so that it doesn't clash with WordPress Core in the future.
You can please use user meta to store user meta data and WordPress upgrade does not change any meta data values when we update it's latest version.