-
Notifications
You must be signed in to change notification settings - Fork 2
TweakingSQL
Tapper team edited this page Mar 11, 2016
·
4 revisions
- dump create table statements as DBIx::Class (the Object-Relational-Mapper library) would use them
- modify thoat SQL dump to your needs
- execute that modified SQL against your database
- initialize Tapper with
tapper init --default
but skip its table creation part for thetestrundb
You should have installed all Tapper modules, e.g., by following the HelloWorld instructions.
mkdir -p /tmp/my-tweaked-tapper-tables
cd /tmp/my-tweaked-tapper-tables
perl -MTapper::Schema::TestrunDB -MTapper::Model=model -e 'model->create_ddl_dir([qw/MySQL SQLite/], undef, "./")'
vi Tapper-Schema-TestrunDB-4.001043-MySQL.sql
# patch manually whatever you consider important
Remember that the relational structure, constraints, etc. should still match the schema as defined in Tapper::Schema::TestrunDB.
$ mysql -u root -p
$ mysql> drop database testrundb;
$ mysql> create database if not exists testrundb;
mysql> grant all on `testrundb`.* to `tapper`@localhost identified by 'verysecret';
mysql> quit;
Modify these statements to your needs, e.g., for using UTF-8.
mysql -u tapper -pverysecret testrundb < Tapper-Schema-TestrunDB-4.001043-MySQL.sql
- About
- Deployment
- Hello World - easiest start