ttgive / qeephp

Automatically exported from code.google.com/p/qeephp
0 stars 0 forks source link

数据库版本管理工具 #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
需要一个工具维护数据库设计的不同版本。

这个工具有下列基本功能:
1、比对两个版本数据库结构之间的差异,生成从一个版本转�
��到另一个版本需要的
sql 脚本
2、能够从 model 的定义获得数据库结构设计

Original issue reported on code.google.com by dualf...@gmail.com on 18 Apr 2008 at 7:03

GoogleCodeExporter commented 9 years ago

Original comment by dualf...@gmail.com on 18 Apr 2008 at 7:06

GoogleCodeExporter commented 9 years ago

Original comment by dualf...@gmail.com on 19 Apr 2008 at 8:34

GoogleCodeExporter commented 9 years ago
考虑可以基于 yaml 来定义模型,然后从 yaml 
定义生成模型和数据表。修改 yaml 定义后,通
过 migration 同步模型和数据表。

不过这样做的弊端就是模型的定义分割为了两部分:

-  基于 yaml 来定义模型的属性、验证规则、过滤器等
-  基于 php 代码来定义模型的行为

优劣还需要仔细斟酌

Original comment by dualf...@gmail.com on 17 Jan 2009 at 4:43