CN107608703A - A kind of method of database local upgrade - Google Patents
A kind of method of database local upgrade Download PDFInfo
- Publication number
- CN107608703A CN107608703A CN201711047623.4A CN201711047623A CN107608703A CN 107608703 A CN107608703 A CN 107608703A CN 201711047623 A CN201711047623 A CN 201711047623A CN 107608703 A CN107608703 A CN 107608703A
- Authority
- CN
- China
- Prior art keywords
- database
- app
- upgrade
- version number
- local upgrade
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to a kind of method of database local upgrade, comprise the following steps:When App starts, first call DBVersionManger classes, in the init methods of DBVersionManger classes, data below storehouse local upgrade detecting step is performed, first, call checkUpgrade methods, detect whether to need to carry out database local upgrade, if needing, then carry out recurrence updating operation, if it is not required, then it is transferred to the follow-up normal use step of database.The present invention, APP operationally can automatic detection whether need to carry out database local upgrade, using simple, improve development efficiency, what developer can be independently is managed to data qurush level, controls, effective guarantee Information Security.
Description
Technical field
The present invention relates to database technical field, specifically a kind of method of database local upgrade.
Background technology
Existing App, the support of database is operationally needed mostly, with the upgrading of App versions, database is also required to
It is corresponding to upgrade to support redaction App operation.
In existing IOS systems, although providing corresponding function and interface of database upgrade etc., use more
It is cumbersome, App maintenance is not easy to, constrains redaction App development efficiency.
The content of the invention
For defect present in prior art, it is an object of the invention to provide a kind of side of database local upgrade
Method, APP operationally can automatic detection whether need carry out database local upgrade, use it is simple, improve development efficiency, exploitation
Person can be independently data qurush level is managed, controlled, effective guarantee Information Security.
To achieve the above objectives, the present invention adopts the technical scheme that:
A kind of method of database local upgrade, it is characterised in that comprise the following steps:
When App starts, DBVersionManger classes are first called,
In the init methods of DBVersionManger classes, data below storehouse local upgrade detecting step is performed,
First, checkUpgrade methods are called, detect whether to need to carry out database local upgrade,
If needing, then recurrence updating operation is carried out,
If it is not required, then it is transferred to the follow-up normal use step of database.
On the basis of above-mentioned technical proposal, detect whether to need to carry out concretely comprising the following steps for database local upgrade:
The current table version number of each table in database is obtained,
The table version number needed for the operation App of App records is obtained,
It is more than current table version number when running the table version number needed for App, then is to need to carry out database local upgrade,
It is equal to or less than current table version number when running the table version number needed for App, then need not carries out database local upgrade.
On the basis of above-mentioned technical proposal, the current table version number of each table, is stored in a Version in database
In database.
On the basis of above-mentioned technical proposal, the table version number needed for the operation App of App records, encapsulated when compiling App
Among App.
On the basis of above-mentioned technical proposal, the recurrence upgrading refers to:When the table version needed for the operation App of App records
The current table version number of each table in this number, and database, when carrying out the upgrading more than once therebetween,
By upgrading number, upgraded successively, after often completing upgrading once, repeat to detect whether to need to carry out database sheet
The specific steps of ground upgrading.
On the basis of above-mentioned technical proposal, when being upgraded successively, corresponding upgrade algorithm, encapsulated when compiling App
Among App, or the upgrade algorithm bag or upgraded module or upgrade server that are obtained by outside provide.
On the basis of above-mentioned technical proposal, table version number is represented with positive integer, is often upgraded once, and Ze Biao version numbers add
One.
On the basis of above-mentioned technical proposal, the database includes but is not limited to:MySQL, SQLite.
The method of database local upgrade of the present invention, APP operationally can automatic detection whether need into line number
According to storehouse local upgrade, using simple, development efficiency is improved, what developer can be independently is managed to data qurush level, controls, and has
Effect ensures Information Security.
Brief description of the drawings
The present invention has drawings described below:
The flow chart of Fig. 1 present invention.
Embodiment
The present invention is described in further detail below in conjunction with accompanying drawing.
As shown in figure 1, the method for database local upgrade of the present invention, comprises the following steps:
When App starts, DBVersionManger classes are first called,
In the init methods of DBVersionManger classes, data below storehouse local upgrade detecting step is performed,
First, checkUpgrade methods are called, detect whether to need to carry out database local upgrade,
If needing, then recurrence updating operation is carried out,
If it is not required, then it is transferred to the follow-up normal use step of database.
On the basis of above-mentioned technical proposal, detect whether to need to carry out concretely comprising the following steps for database local upgrade:
The current table version number of each table in database is obtained,
The table version number needed for the operation App of App records is obtained,
It is more than current table version number when running the table version number needed for App, then is to need to carry out database local upgrade,
It is equal to or less than current table version number when running the table version number needed for App, then need not carries out database local upgrade.
On the basis of above-mentioned technical proposal, the current table version number of each table, is stored in a Version in database
In database.
On the basis of above-mentioned technical proposal, the table version number needed for the operation App of App records, encapsulated when compiling App
Among App.
On the basis of above-mentioned technical proposal, the recurrence upgrading refers to:When the table version needed for the operation App of App records
The current table version number of each table in this number, and database, when carrying out the upgrading more than once therebetween,
By upgrading number, upgraded successively, after often completing upgrading once, repeat to detect whether to need to carry out database sheet
The specific steps of ground upgrading.
On the basis of above-mentioned technical proposal, when being upgraded successively, corresponding upgrade algorithm, encapsulated when compiling App
Among App, or the upgrade algorithm bag or upgraded module or upgrade server that are obtained by outside provide.
On the basis of above-mentioned technical proposal, table version number is represented with positive integer, is often upgraded once, and Ze Biao version numbers add
One.
On the basis of above-mentioned technical proposal, the database includes but is not limited to:MySQL, SQLite.
The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.
Claims (8)
- A kind of 1. method of database local upgrade, it is characterised in that comprise the following steps:When App starts, DBVersionManger classes are first called,In the init methods of DBVersionManger classes, data below storehouse local upgrade detecting step is performed,First, checkUpgrade methods are called, detect whether to need to carry out database local upgrade,If needing, then recurrence updating operation is carried out,If it is not required, then it is transferred to the follow-up normal use step of database.
- 2. the method for database local upgrade as claimed in claim 1, it is characterised in that:Detect whether to need to carry out database Local upgrade concretely comprises the following steps:The current table version number of each table in database is obtained,The table version number needed for the operation App of App records is obtained,It is more than current table version number when running the table version number needed for App, then is to need to carry out database local upgrade,It is equal to or less than current table version number when running the table version number needed for App, then need not carries out database local upgrade.
- 3. the method for database local upgrade as claimed in claim 2, it is characterised in that:The current table of each table in database Version number, it is stored in a Version database.
- 4. the method for database local upgrade as claimed in claim 2, it is characterised in that:Needed for the operation App of App records Table version number, it is encapsulated in when compiling App among App.
- 5. the method for database local upgrade as claimed in claim 1, it is characterised in that:The recurrence upgrading refers to:Work as App Table version number needed for the operation App of record, and in database each table current table version number, carried out once therebetween During the upgrading of the above,By upgrading number, upgraded successively, after often completing upgrading once, repeat to detect whether to need to carry out database sheet The specific steps of ground upgrading.
- 6. the method for database local upgrade as claimed in claim 5, it is characterised in that:When being upgraded successively, accordingly Upgrade algorithm, among being encapsulated in App when compiling App, or the upgrade algorithm bag obtained by outside or upgraded module or upgrading Server provides.
- 7. the method for database local upgrade as claimed in claim 5, it is characterised in that:Table version number represents with positive integer, Often upgrade once, Ze Biao version numbers add one.
- 8. the method for database local upgrade as claimed in claim 1, it is characterised in that:The database includes but unlimited In:MySQL, SQLite.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711047623.4A CN107608703B (en) | 2017-10-31 | 2017-10-31 | Method for locally upgrading database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711047623.4A CN107608703B (en) | 2017-10-31 | 2017-10-31 | Method for locally upgrading database |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107608703A true CN107608703A (en) | 2018-01-19 |
CN107608703B CN107608703B (en) | 2020-11-03 |
Family
ID=61083956
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711047623.4A Active CN107608703B (en) | 2017-10-31 | 2017-10-31 | Method for locally upgrading database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107608703B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495733A (en) * | 2011-12-08 | 2012-06-13 | 方正国际软件有限公司 | Methods for detecting compatibility of application program and relevant database script and performing upgrading maintenance on application program and relevant database script |
US20150363452A1 (en) * | 2014-06-15 | 2015-12-17 | Enping Tu | Hybrid database upgrade migration |
CN106445618A (en) * | 2016-10-17 | 2017-02-22 | 成都知道创宇信息技术有限公司 | Automatic database updating method |
-
2017
- 2017-10-31 CN CN201711047623.4A patent/CN107608703B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495733A (en) * | 2011-12-08 | 2012-06-13 | 方正国际软件有限公司 | Methods for detecting compatibility of application program and relevant database script and performing upgrading maintenance on application program and relevant database script |
US20150363452A1 (en) * | 2014-06-15 | 2015-12-17 | Enping Tu | Hybrid database upgrade migration |
CN106445618A (en) * | 2016-10-17 | 2017-02-22 | 成都知道创宇信息技术有限公司 | Automatic database updating method |
Also Published As
Publication number | Publication date |
---|---|
CN107608703B (en) | 2020-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104573525B (en) | A kind of specific information service software leak repair system based on white list | |
CN104461786B (en) | The restoration methods of android system and the recovery system of android system | |
CN105224361B (en) | A kind of method and system upgraded to sqlite3 type embedded databases | |
CN107346284B (en) | Application program detection method and detection device | |
CN107656776A (en) | A kind of firmware update, device and the medium of FPGA accelerator cards | |
US20160170735A1 (en) | Operating system updating method by using a checklist | |
CN104077401A (en) | Database data migration device and method | |
CN103902480A (en) | Android phone driving method and system | |
CN103425663A (en) | Method and device for creating tables, saving records and deleting records for embedded system database | |
CN104966021A (en) | Creating and analytic methods and device for security baseline data files | |
CN105095207A (en) | Methods for retrieving and obtaining contents of application software, and devices for retrieving and obtaining contents of application software | |
CN102830995A (en) | Method for upgrading Android platform software with user data reserved | |
CN105302711A (en) | Application repairing method and apparatus and terminal | |
CN104216719A (en) | Method and device for updating android system | |
CN107301070A (en) | A kind of upgrade method and terminal | |
CN102012990A (en) | Method and device for repairing bugs of third-party software | |
CN103984574A (en) | Method and system for updating website | |
CN106843908A (en) | Data integrated collection method and system | |
CN105740003A (en) | Method and device for recovering virtual machine, as well as method and device for upgrading virtual machine | |
CN104253706A (en) | Method and device for monitoring database management platform | |
CN103226603A (en) | File synchronization update method and system based on portable storage device | |
CN105955773A (en) | System upgrading method and device | |
CN104142959A (en) | Automated test device and method based on expert knowledge database | |
CN103763336A (en) | Software update method oriented to complex network architecture | |
CN105739964A (en) | Implementation method for supporting version compatibility control based on Android platform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |