8/38

Freeze

By default RedBeanPHP operates in fluid mode. In fluid mode the database schema gets updated to meet the requirements of your code. This is ideal for development. During development you can just make beans, put them in the database and don't worry about the rest. When you are done developing you should review the database schema and make manual adjustements where necessary. Then, you can freeze RedBeanPHP with the R::freeze(true) command. This will lock the schema to prevent further modifications.


    R
::freezetrue ); //will freeze redbeanphp

Things to do after freezing the schema:

1. Check the column types
2. Configure the foreign keys
3. Add additional indexes for better performance

Don't forget to freeze and review the database schema afterwards!



User contributed notes. Please use the comment section to provide tips, notes and examples. To ask for support or to provide feedback use the forum. For bug reports use Github Issue Tracker.

Site comments powered by Disqus

page generated in 0.010334014892578 sec.