承接 neam/yii-dna-pre-release-testing 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

neam/yii-dna-pre-release-testing

Composer 安装命令:

composer require neam/yii-dna-pre-release-testing

包简介

Yii DNA Pre-Release Testing

README 文档

README

MIGRATION NOTICE: Repository migrated to https://github.com/neam/dna-project-base-data-set-management

Scripts and database migrations folder structure suited for release-upgrade testing with fake data and cloned real user data.

Rationale and definitions

We want to be able to develop/test the code both starting from an empty database, and with data imported from a production deployment. These two testing-data-scenarios are referred to as "clean-db" vs "user-generated", and all acceptance tests should be grouped into one or both of these. The "clean-db" data is saved in db/migration-base/clean-db/, the user-generated schema is saved in s3://user-data-backups at the path specified within files located in db/migration-base/user-generated/

User-generated data

User generated data is backed up to S3 by running a command specified in the readme. This includes the schema, table data and uploaded user media.

Database migrations

Handled by Propel.

DATA profiles

Since there may be multiple independent databases deployed, one may keep track of them separately by creating data profiles. That is, instead of simply having "clean-db" and "user-generated" variants, we can create any new dataset and call it for instance "customer1" to be able to track the data set of that particular customer-deployment.

FAQ

How are new DATA profiles added?

Create a new data profile using the helper script, then upload the current current user-generated data to S3, commit the references and profile-related files in dna (anything with in it's path) and push.

vendor/neam/yii-dna-pre-release-testing/shell-scripts/new-data-profile.sh <profileref>
vendor/neam/yii-dna-pre-release-testing/shell-scripts/upload-user-data-backup.sh
# then run the three commands to update the data refs
# commit and push

Removing applied migrations in order to remove clutter

Run the following to take the current user-generated schema and copies it to the migration base of the clean-db schema. This makes the default schema to be identical with the user-generated version, and this routine should be done after a release (ie when migrations have been run in production) so that already production-applied migrations can be removed from the current codebase in order to minimize clutter.

export DATA=example
vendor/neam/yii-dna-pre-release-testing/shell-scripts/post-release-user-generated-schema-to-clean-db-schema-routine.sh
# then, manually remove already applied migrations

A comment: Migrations are crucial when it comes to upgrading older deployments to the latest schema. If, however, there are no need of upgrading older deployments to the latest schema and code, migrations may instead add to the maintenance and development routines burden without adding value to the project. This is for instance the case during early development where there are no live deployments, or when all live deployments have run all migrations to date and there is no need to restore from old backups.

统计信息

  • 总下载量: 578
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 4
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: Shell

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-09-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固