In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
The dbCreate property in the DataSource.groovy file is important because it can be used to specify whether database tables are automatically created based on the GORM class. The optional values are:
Create-drop-delete and re-establish the database when Grails is running
Create-create a database if it does not exist, without modification
Update-create a database if it does not exist and modify it if it does
Under the development environment (development), the dbCreate property is set to create-drop by default:
DataSource {dbCreate = "create-drop" / / one of 'create',' create-drop','update'} this deletes the original database and rebuilds it when the Grails application starts, which usually needs to be modified in a production environment.
There was a problem in production today, and the reason for the problem was that a new field was added to the production data. The reason was that we had recently changed some requirements and added a new field. When the front desk was deployed to the QA system, the database was connected to the production. Login found that there was a problem, and shutdow immediately. Later, when the customer used it the next day, he found that some functions could not report an error. He complained this afternoon. Find the reason is that the QA system has a new field update to production, resulting in can not be used, and then deleted this field, the system can finally be used, scared a. In the final analysis, I was careless. Later, I thought about dbCreate=update when configuring the data source. Today, I have a deep understanding of this field. It is very dangerous, so you should be very careful to modify the configuration of the database when you release it, otherwise it is easy to have problems. Fortunately, today's bloody lesson has been solved.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.