[new] converted to database global variables
[new] migration to setup global variables
[new] added read and write global variable methods
[new] moved deprecated model functions to deprecated.php