CN114115952A - Method and device for automatically upgrading packaged low-code application - Google Patents

Method and device for automatically upgrading packaged low-code application Download PDF

Info

Publication number
CN114115952A
CN114115952A CN202111445241.3A CN202111445241A CN114115952A CN 114115952 A CN114115952 A CN 114115952A CN 202111445241 A CN202111445241 A CN 202111445241A CN 114115952 A CN114115952 A CN 114115952A
Authority
CN
China
Prior art keywords
database
script
data
sql
packaging
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.)
Pending
Application number
CN202111445241.3A
Other languages
Chinese (zh)
Inventor
吕大兵
汪澄
羊旭峰
张爱春
黄磊磊
王明
顾艳玲
周海涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Hanma Intelligent Technology Co ltd
Original Assignee
Suzhou Hanma Intelligent Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Hanma Intelligent Technology Co ltd filed Critical Suzhou Hanma Intelligent Technology Co ltd
Priority to CN202111445241.3A priority Critical patent/CN114115952A/en
Publication of CN114115952A publication Critical patent/CN114115952A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The invention provides a method for automatically upgrading a packaged low-code application, which comprises the following steps of packaging and storing the application program created by a low-code development platform, wherein the storage file comprises all data files required by the operation of the application program; acquiring SQL sentences which are not written in the relevant structure of the model table; acquiring a platform upgrading script file which is not written with a database script; generating a database script and outputting record information; and placing the database script in an independently deployed running environment to realize automatic application upgrading. The invention has the following beneficial effects: aiming at a low-code development platform, the md5 value of each record in a database table is compared with the md5 value generated by packaging last time, so as to identify whether the data is changed and further form an upgrade file, planning and deploying can be carried out according to the own needs, and the method is simple and effective.

Description

Method and device for automatically upgrading packaged low-code application
Technical Field
The invention relates to the technical field of computers, in particular to a method for automatically upgrading a low-code application after packaging, a computer-readable storage medium and an electronic device.
Background
With the continuous popularization of the concept of low codes, a plurality of low code development platforms appear in the market, the low code development platforms mainly comprise deuterium cloud, iVX, light stream, lapping cloud, AppSheat, clear cloud, knife, APICloud and the like in China, but the applications designed based on the low code platforms cannot be independently deployed and operated without the platforms. Upgrading applications designed on these low-code platforms is also very inconvenient. In view of this, it is desirable to provide a convenient method for automatic upgrade after packaging of low-code applications.
Disclosure of Invention
The invention aims to provide a method for automatically upgrading a low-code application after packaging, a computer-readable storage medium and an electronic device.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a method for automatically upgrading a low-code application after packaging comprises the following steps,
packaging and storing the application program created by the low-code development platform, wherein the storage file of the application program comprises all data files required by the operation of the application program;
acquiring SQL sentences which are not written in the relevant structure of the model table;
acquiring a platform upgrading script file which is not written with a database script;
generating a database script and outputting record information;
and placing the database script in an independently deployed running environment to realize automatic application upgrading.
Preferably, the data file at least includes a database script required for creating the application program, and the database script required for creating the application program is placed in different directories of the schema.
Preferably, sql files under the schema directory are collectively called platform upgrade script files, and the platform upgrade script files store dml and ddl statements of a database, wherein _create.
And storing a packaging strategy of the database table in a properties file under the schema directory, wherein ONLY _ STRUCTURE represents ONLY SQL sentences related to the STRUCTURE of the database table to be written into the database script, FULL _ DATA represents SQL sentences related to the STRUCTURE of the database table and all DATA of the table to be written into the database script, DEFAULT _ DATA represents SQL sentences related to the STRUCTURE of the database table and initialized DATA when an application is created to be written into the database script.
Preferably, the "acquiring the SQL statements related to the unwritten model table structure" specifically includes: when the first packaging and storage of the application program is judged, obtaining SQL sentences of all database script models; when the application program is judged to be packed and stored for the nth time, if n is larger than 1, reading max _ time of (n-1) _ model _ time.
Preferably, the "acquiring a platform upgrade script file in which a database script is not written" specifically includes: when the first packaging and storage of the application program is judged, all platform upgrading script files are obtained; when the application program is judged to be packed and stored for the nth time, n is larger than 1, all platform upgrading script files are obtained, and the platform upgrading script files read from (n-1) _ upgrade _ sql.txt are removed, wherein the n _ upgrade _ sql.txt records the information of the relevant platform upgrading script files written into the database script during the nth packing and storage of the application program, and the n _ upgrade _ sql.txt files are automatically generated after the packing and storage are completed.
Preferably, the "outputting the record information" is embodied as
Outputting the maximum time max _ time of the database script model upgrading SQL to n _ model _ time. txt;
and outputting the platform upgrading script file information to n _ upgrade _ sql.
Preferably, the "generating database script" is specifically
Writing the obtained platform upgrading script file into a database script, firstly writing the statements in _ create.sql and _ alter.sql, and then writing the statements in _ default _ dml.sql;
writing the SQL sentences related to the obtained model table structure into an upgrade file;
acquiring and comparing md5 data; when the application program is stored for the first time in a package mode, the md5 data value is null; when the application program is packed and stored for the nth time, n is larger than 1, reading (n-1) _ summary.txt and analyzing the md5 data value, wherein the n _ summary.txt records the md5 data value of each record in the database table after each packing; comparing the md5 data value generated by the nth packaging storage of the application program with the md5 data value generated by the (n-1) th packaging storage;
traversing the data table; judging whether a data table with md5 data value changes exists, judging whether the data table with md5 data value changes fully synchronizes data when the data table with md5 data value changes exists, wherein the synchronization strategy of the data table is FULL _ DAT, and if yes, generating an SQL statement, writing the SQL statement into a database script and continuously traversing the data table; and ending when the data table with the md5 data value changed does not exist.
Preferably, the "generating an SQL statement and writing the database script" specifically includes generating an insert statement when a data table with md5 data value changes is not queried, and generating an update statement when md5 data value changes after comparison; and generating a delete statement when the md5 data value is changed and the data value does not exist in the table after comparison.
The invention discloses a computer readable storage medium, which stores at least one program, wherein the at least one program is executed when being called and realizes the method for automatically upgrading the packaged low-code application.
An electronic device is disclosed that includes a computer readable storage medium as described above.
The invention has the following beneficial effects: aiming at a low-code development platform, the md5 value of each record in a database table is compared with the md5 value generated by packaging last time, so as to identify whether the data is changed and further form an upgrade file, planning and deploying can be carried out according to the own needs, and the method is simple and effective.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow diagram of a method for automatically upgrading a low-code application after packaging according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The Low Code Development Platform (LCDP) is a development platform that can quickly generate an application without encoding (0 code) or with a small amount of code. The method for developing the application program through visualization (referring to a visual programming language) enables developers with different experience levels to create web pages and mobile application programs through a graphical user interface by using a dragging component and model-driven logic.
The invention provides a method for automatically upgrading a packaged low-code application, which comprises the following steps as shown in figure 1: packaging and storing the application program created by the low-code development platform, wherein the storage file of the application program comprises all data files required by the operation of the application program;
acquiring SQL sentences which are not written in the relevant structure of the model table;
acquiring a platform upgrading script file which is not written with a database script;
generating a database script and outputting record information;
and placing the database script in an independently deployed running environment to realize automatic application upgrading.
The steps are described in detail as follows:
the data file at least includes a database script required for creating the application program, and certainly also includes a file related to a process and a state machine, and a file uploaded during application design, such as an xlsx template file used during importing data. And the database script required by the creation of the application program is placed in different directories of the schema.
Preferably, the sql file under the schema directory is collectively referred to as a platform upgrade script file, and the platform upgrade script file stores dml and ddl statements of a database, wherein _create.
And storing a packaging strategy of the database table in a properties file under the schema directory, wherein ONLY _ STRUCTURE represents ONLY SQL sentences related to the STRUCTURE of the database table to be written into the database script, FULL _ DATA represents SQL sentences related to the STRUCTURE of the database table and all DATA of the table to be written into the database script, DEFAULT _ DATA represents SQL sentences related to the STRUCTURE of the database table and initialized DATA when an application is created to be written into the database script.
In the preferred embodiment, the "obtaining the SQL statement related to the unwritten model table structure" specifically includes: when the first packaging and storage of the application program is judged, obtaining SQL sentences of all database script models; when the application program is judged to be packed and stored for the nth time, if n is larger than 1, reading max _ time of (n-1) _ model _ time.
In this preferred embodiment, the "acquiring a platform upgrade script file into which a database script is not written" specifically includes: when the first packaging and storage of the application program is judged, all platform upgrading script files are obtained; when the application program is judged to be packed and stored for the nth time, n is larger than 1, all platform upgrading script files are obtained, and the platform upgrading script files read from (n-1) _ upgrade _ sql.txt are removed, wherein the n _ upgrade _ sql.txt records the information of the relevant platform upgrading script files written into the database script during the nth packing and storage of the application program, and the n _ upgrade _ sql.txt files are automatically generated after the packing and storage are completed.
The "outputting the recording information" is specifically: outputting the maximum time max _ time of the database script model upgrading SQL to n _ model _ time. txt; and outputting the platform upgrading script file information to n _ upgrade _ sql. The purpose is to mark data to indicate that some data has been packed, so that the previous data will not be packed again in the next packing.
The key point of the invention is 'generating database script', which specifically comprises the following steps:
writing the obtained platform upgrading script file into a database script, firstly writing the statements in _ create.sql and _ alter.sql, and then writing the statements in _ default _ dml.sql;
writing the SQL sentences related to the obtained model table structure into an upgrade file;
acquiring and comparing md5 data; when the application program is stored for the first time in a package mode, the md5 data value is null; when the application program is packed and stored for the nth time, n is larger than 1, reading (n-1) _ summary.txt and analyzing the md5 data value, wherein the n _ summary.txt records the md5 data value of each record in the database table after each packing; comparing the md5 data value generated by the nth packaging storage of the application program with the md5 data value generated by the (n-1) th packaging storage;
traversing the data table; judging whether a data table with md5 data value changes exists, judging whether the data table with md5 data value changes fully synchronizes data when the data table with md5 data value changes exists, wherein the synchronization strategy of the data table is FULL _ DAT, and if yes, generating an SQL statement, writing the SQL statement into a database script and continuously traversing the data table; and ending when the data table with the md5 data value changed does not exist.
Preferably, the "generating an SQL statement and writing the database script" specifically includes generating an insert statement when a data table with md5 data value changes is not queried, and generating an update statement when md5 data value changes after comparison; and generating a delete statement when the md5 data value is changed and the data value does not exist in the table after comparison.
The invention discloses a computer readable storage medium, which stores at least one program, wherein the at least one program is executed when being called and realizes the method for automatically upgrading the packaged low-code application.
An electronic device is disclosed that includes a computer readable storage medium as described above.
The application design of the invention is repackaged after the change, the changed part is automatically identified, the upgrade file (flyway script) is generated, and the upgrade file is placed in the independently deployed operating environment, thereby automatically realizing the application upgrade. The automatic upgrade is realized by the open source framework flyway of java.
The method for automatically upgrading after packaging low-code applications, the computer-readable storage medium and the electronic device provided by the invention are described in detail, specific examples are applied in the text to explain the principle and the implementation mode of the invention, and the description of the above embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for automatically upgrading a low-code application after packaging is characterized by comprising the following steps,
packaging and storing the application program created by the low-code development platform, wherein the storage file of the application program comprises all data files required by the operation of the application program;
acquiring SQL sentences which are not written in the relevant structure of the model table;
acquiring a platform upgrading script file which is not written with a database script;
generating a database script and outputting record information;
and placing the database script in an independently deployed running environment to realize automatic application upgrading.
2. The method for automatic upgrade after packaging of low code applications according to claim 1, wherein the data file comprises at least a database script required for creating the application, and the database script required for creating the application is placed in a different directory of the schema.
3. The method for automatic upgrade after packaging of low code application according to claim 2, wherein sql file under the schema directory is collectively called platform upgrade script file, and the platform upgrade script file stores dml and ddl statements of database, wherein create is storing related statement of creating database table, alter is storing related statement of modifying database table structure, default is storing initialization statement of database table, full is storing initialization statement of database table, and when packaging the statement in the file, it will not be written into database script, and express is storing database table structure which is needed by application in design stage but not needed by independent deployment stage;
and storing a packaging strategy of the database table in a properties file under the schema directory, wherein ONLY _ STRUCTURE represents ONLY SQL sentences related to the STRUCTURE of the database table to be written into the database script, FULL _ DATA represents SQL sentences related to the STRUCTURE of the database table and all DATA of the table to be written into the database script, DEFAULT _ DATA represents SQL sentences related to the STRUCTURE of the database table and initialized DATA when an application is created to be written into the database script.
4. The method for automatic upgrade after packaging of low-code applications according to claim 3, wherein the "obtaining SQL statements related to structures that have not been written to the model table" specifically includes: when the first packaging and storage of the application program is judged, obtaining SQL sentences of all database script models; when the application program is judged to be packed and stored for the nth time, if n is larger than 1, reading max _ time of (n-1) _ model _ time.
5. The method for automatic upgrade after packaging of low-code applications according to claim 4, wherein the "obtaining a platform upgrade script file into which a database script has not been written" specifically includes: when the first packaging and storage of the application program is judged, all platform upgrading script files are obtained; when the application program is judged to be packed and stored for the nth time, n is larger than 1, all platform upgrading script files are obtained, and the platform upgrading script files read from (n-1) _ upgrade _ sql.txt are removed, wherein the n _ upgrade _ sql.txt records the information of the relevant platform upgrading script files written into the database script during the nth packing and storage of the application program, and the n _ upgrade _ sql.txt files are automatically generated after the packing and storage are completed.
6. The method for automatic upgrade after packaging of low-code application according to claim 5, wherein the output record information is specifically
Outputting the maximum time max _ time of the database script model upgrading SQL to n _ model _ time. txt;
and outputting the platform upgrading script file information to n _ upgrade _ sql.
7. The method for automatic upgrade after packaging of low-code application according to claim 1, wherein the "generate database script" is specifically
Writing the obtained platform upgrading script file into a database script, firstly writing the statements in _ create.sql and _ alter.sql, and then writing the statements in _ default _ dml.sql;
writing the SQL sentences related to the obtained model table structure into an upgrade file;
acquiring and comparing md5 data; when the application program is stored for the first time in a package mode, the md5 data value is null; when the application program is packed and stored for the nth time, n is larger than 1, reading (n-1) _ summary.txt and analyzing the md5 data value, wherein the n _ summary.txt records the md5 data value of each record in the database table after each packing; comparing the md5 data value generated by the nth packaging storage of the application program with the md5 data value generated by the (n-1) th packaging storage;
traversing the data table; judging whether a data table with md5 data value changes exists, judging whether the data table with md5 data value changes fully synchronizes data when the data table with md5 data value changes exists, wherein the synchronization strategy of the data table is FULL _ DAT, and if yes, generating an SQL statement, writing the SQL statement into a database script and continuously traversing the data table; and ending when the data table with the md5 data value changed does not exist.
8. The method for automatic upgrading after packaging of low-code applications according to claim 7, wherein the "generating SQL statements and writing in database scripts" specifically includes generating insert statements when a data table with md5 data values changed is not queried, and generating update statements when md5 data values are changed after comparison; and generating a delete statement when the md5 data value is changed and the data value does not exist in the table after comparison.
9. A computer-readable storage medium storing at least one program, wherein the at least one program, when invoked, executes and implements the method for automatic upgrade after packaging of a low code application as claimed in any one of claims 1-8.
10. An electronic device, characterized in that the electronic device comprises the computer-readable storage medium according to claim 9.
CN202111445241.3A 2021-11-30 2021-11-30 Method and device for automatically upgrading packaged low-code application Pending CN114115952A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111445241.3A CN114115952A (en) 2021-11-30 2021-11-30 Method and device for automatically upgrading packaged low-code application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111445241.3A CN114115952A (en) 2021-11-30 2021-11-30 Method and device for automatically upgrading packaged low-code application

Publications (1)

Publication Number Publication Date
CN114115952A true CN114115952A (en) 2022-03-01

Family

ID=80368923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111445241.3A Pending CN114115952A (en) 2021-11-30 2021-11-30 Method and device for automatically upgrading packaged low-code application

Country Status (1)

Country Link
CN (1) CN114115952A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630086A (en) * 2022-12-22 2023-01-20 西安葡萄城软件有限公司 Method for converting Access application into Web application program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630086A (en) * 2022-12-22 2023-01-20 西安葡萄城软件有限公司 Method for converting Access application into Web application program
CN115630086B (en) * 2022-12-22 2023-03-10 西安葡萄城软件有限公司 Method for converting Access application into Web application program

Similar Documents

Publication Publication Date Title
US8250523B2 (en) Source code wrapper generation
CN103593216B (en) The system file of ubi forms is fabricated to factory's burning image file method
CN103955363B (en) A kind of manufacture method of program upgrade installation package
EP2562641B1 (en) Software application porting system
CN109491695A (en) A kind of increment updating method of integrated Android application
CN109448100B (en) Three-dimensional model format conversion method, system, computer device and storage medium
TWI536263B (en) Projecting native application programming interfaces of an operating system into other programming languages
US9524279B2 (en) Help document animated visualization
US11016785B2 (en) Method and system for mirror image package preparation and application operation
CN103077043B (en) A kind of method of quick Start-up and operating performance Linux
CN108647025A (en) Processing method and processing device, electronics and the storage device of DOM Document Object Model interior joint
KR20140067018A (en) Describing native application programming interfaces of an operating system with metadata
CN111176717B (en) Method and device for generating installation package and electronic equipment
Bolin Closure: The definitive guide: Google tools to add power to your JavaScript
CN114115952A (en) Method and device for automatically upgrading packaged low-code application
CN115185519A (en) Auxiliary coding method based on front-end visualization
CN108416035B (en) Disconf-based unified management method for database mapping files
KR101924747B1 (en) Flexible metadata composition
WO2002046909A1 (en) Automatically deploy and upgrade an application based on markup language application definition
WO2019041891A1 (en) Method and device for generating upgrade package
US20110296373A1 (en) Command line shell command generation based on schema
CN113485746B (en) Method and device for generating application program interface document
Bouzid Webpack for Beginners: Your Step-by-Step Guide to Learning Webpack 4
CN114816247A (en) Logic data acquisition method and device
Dangar Learning laravel 4 application development

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