Commit b5d3b9de6993042a4791404abfc7fa9a357b6acd

Authored by ly525
1 parent 1b4cfc4e

docs(migration): migration-guide-1.12.0-to-1.13.0 !#zh: 1.12.0 -> 1.13.0 迁移指南

docs/en/migration-guide/migration-guide-1.12.0-to-1.13.0.md 0 → 100644
  1 +# Migration guide from v.1.12.0 to v.1.13.0
  2 +Upgrading your Luban-H5 application to `v.1.13.0`.
  3 +
  4 +Here are the minor changes:
  5 +remame works table column `mode` to `page_mode`
  6 +
  7 +
  8 +To upgrade a project to the `v.1.13.0` version of Luban-H5 follow the instructions below.
  9 +
  10 +## Steps
  11 +1. choose database and exec the sql
  12 +- MySQL
  13 +
  14 + ```sql
  15 + ALTER TABLE works RENAME COLUMN mode TO page_mode;
  16 + ```
  17 +
  18 +- sqlite
  19 + ```sql
  20 + # sqlite3 luban-h5/back-end/h5-api/.tmp/data.db
  21 + ALTER TABLE works RENAME COLUMN mode TO page_mode;
  22 + ```
  23 +
  24 +2. update front-end
  25 +```bash
  26 +# clone the newest code
  27 +./luban-h5 rebuild_fe
  28 +./luban-h5 restart
  29 +```
  30 +
  31 +feel free open an [issue](https://github.com/ly525/luban-h5/issues) if you have questions about this.
0 32 \ No newline at end of file
... ...
docs/zh/migration-guide/migration-guide-1.12.0-to-1.13.0.md 0 → 100644
  1 +# 鲁班 H5 v.1.12.0 至 v.1.13.0 迁移指南
  2 +
  3 +升级`鲁班H5`版本至 `v.1.13.0`.
  4 +
  5 +主要修改请参见[v1.13.0 release log](https://github.com/ly525/luban-h5/releases/tag/v1.13.0)
  6 +
  7 +### 背景介绍
  8 +因为涉及了数据库字段的改动,但比较简单:是将 works 表的 mode 列 重命名为 page_mode
  9 +
  10 +原因是:mode 是一个无意义的词语,因此改为 page_mode 用来表明 H5 作品的页面的当前模式,是:
  11 +
  12 +- 长页面(PAGE_MODE.LONG_PAGE)
  13 +- 翻页 H5(PAGE_MODE.SWIPPER_PAGE)
  14 +
  15 +### 升级步骤
  16 +1. 请根据自己的数据库,选择更新方案
  17 +
  18 +- MySQL
  19 +```sql
  20 +ALTER TABLE works RENAME COLUMN mode TO page_mode;
  21 +```
  22 +
  23 +- Sqlite
  24 +```sql
  25 +# sqlite3 luban-h5/back-end/h5-api/.tmp/data.db
  26 +ALTER TABLE works RENAME COLUMN mode TO page_mode;
  27 +```
  28 +
  29 +```bash
  30 +sqlite3 luban-h5/back-end/h5-api/.tmp/data.db
  31 +SQLite version 3.28.0 2019-04-15 14:49:49
  32 +Enter ".help" for usage hints.
  33 +sqlite> ALTER TABLE works RENAME COLUMN mode TO page_mode;
  34 +sqlite> .exit
  35 +```
  36 +
  37 +2. 前端代码更新
  38 +```bash
  39 +# pull 最新代码
  40 +# 重新编译前端代码
  41 +./luban-h5 rebuild_fe
  42 +./luban-h5 restart
  43 +```
  44 +
  45 +如果有疑问,提 [issue](https://github.com/ly525/luban-h5/issues) 即可
... ...