Core: Best safe way to add columns to database?

Created on 5 Feb 2018  路  2Comments  路  Source: php-telegram-bot/core

What is the safest way to add more columns to any table of the database? In my case, _user_ table.

Most helpful comment

Just add them normally with APPEND TABLE ..., nothing will break since we are using prepared statements with chosen list of columns.

I have for example modified user_chat table to have field active which is set to true if user is in that group chat and false if he's not (bot tracks newchatmembers and leftchatmember updates and updates data in that table).

All 2 comments

Just add them normally with APPEND TABLE ..., nothing will break since we are using prepared statements with chosen list of columns.

I have for example modified user_chat table to have field active which is set to true if user is in that group chat and false if he's not (bot tracks newchatmembers and leftchatmember updates and updates data in that table).

Great! thanks @jacklul

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheSleepySlee picture TheSleepySlee  路  3Comments

Bl0ck154 picture Bl0ck154  路  3Comments

sayjeyhi picture sayjeyhi  路  3Comments

smaznet picture smaznet  路  4Comments

abbe-cipher picture abbe-cipher  路  4Comments