SlideShare a Scribd company logo
1 of 43
Download to read offline
L-MIGRATOR
BRINGING DATABASE MIGRATIONS TO LASSO
            BRIAN LOOMIS

     LASSO DEVELOPER CONFERENCE
             CHICAGO 2008
GLUEWARE


WHAT’S IN BOISE?
HEWLETT PACKARD, MICRON.

FOUNDED 9 YEARS AGO,
BOISE IDAHO. -1999

SCRIPTING APPLESCRIPT,
FILEMAKER, LASSO,
ADOBE INDESIGN SERVER.

ADOBE PARTNER, APPLE
CONSULTANTS NETWORK, LPA.
WHAT ARE MIGRATIONS?
A MIGRATION
PLAN DRIVEN CYCLES


MINIMIZE CHANGES

EXTENSIVE UP-FRONT WORK

WATERFALL APPROACH

RUN INTO TROUBLE IF REQUIREMENTS ARE CHANGING

REQUIREMENTS CHURN IS A BIG PROBLEM FOR SUCH
PROCESSES
AGILE DEVELOPMENT

LOVES CHANGE

ALLOWING CHANGES TO OCCUR EVEN LATE IN A
DEVELOPMENT PROJECT

ATTITUDE OF THE PROCESS IS TO ENABLE CHANGE AS
MUCH AS POSSIBLE

RESPONSE TO THE INHERENT INSTABILITY OF
REQUIREMENTS IN MANY PROJECTS

BETTER SUPPORT DYNAMIC BUSINESS ENVIRONMENTS
A DIFFERENT
       ATTITUDE TO DESIGN

INSTEAD OF THINKING OF DESIGN AS A PHASE - YOU
LOOK AT DESIGN AS AN ON-GOING PROCESS

INSTEAD OF THE COMMON CHAOS

ALLOW EVOLUTIONARY DESIGN TO WORK IN A
CONTROLLED MANNER

PROVIDE TECHNIQUES TO CONTROL EVOLUTIONARY
DESIGN AND MAKE THEM PRACTICAL
ITERATIVE DEVELOPMENT


RUN THE ENTIRE SOFTWARE LIFE-CYCLE MANY TIMES
DURING THE LIFE OF A PROJECT

COMPLETING THE ITERATION WITH WORKING, TESTED,
INTEGRATED CODE FOR A SMALL SUBSET OF THE
REQUIREMENTS OF THE FINAL PRODUCT

OTHER SPEAKERS...
HOW TO MAKE EVOLUTIONARY
DESIGN WORK FOR DATABASES


COMPLETING THE ITERATION WITH WORKING, TESTED,
INTEGRATED CODE

SMALL SUBSET OF THE REQUIREMENTS OF THE FINAL
PRODUCT

THESE ITERATIONS ARE SHORT, USUALLY RUNNING
BETWEEN A WEEK AND A COUPLE OF MONTHS
TENETS OF AGILE METHODS


PEOPLE WITH DIFFERENT SKILLS AND BACKGROUNDS
NEED TO COLLABORATE VERY CLOSELY TOGETHER

CAN'T COMMUNICATE MAINLY THROUGH FORMAL
MEETINGS AND DOCUMENTS

RECOGNIZES THAT PEOPLE LEARN BY TRYING THINGS
OUT

EACH DEVELOPER TO HAVE THEIR OWN SANDBOX
ALL CHANGES ARE
   DATABASE REFACTORINGS


THREE DIFFERENT CHANGES THAT HAVE TO BE DONE
TOGETHER:

1) CHANGING THE DATABASE SCHEMA

2) MIGRATING THE DATA IN THE DATABASE

3) CHANGING THE DATABASE ACCESS CODE
AUTOMATE THE REFACTORINGS



DATABASE REFACTORING IS AUTOMATED BY WRITING IT
IN THE FORM OF SQL

DDL (FOR THE SCHEMA CHANGE)

DML (FOR THE DATA MIGRATION)
UPDATE ALL
     DATABASE DEVELOPERS


AUTOMATICALLY UPDATE EVERYONE ON THE PROJECT
WHENEVER A CHANGE IS MADE TO THE DATABASE
MASTER.

SAME REFACTORING SCRIPT THAT UPDATES THE
MASTER AUTOMATICALLY UPDATES EVERYONE'S
DATABASE
CLEARLY SEPARATE ALL
    DATABASE ACCESS CODE
IT'S IMPORTANT TO BE ABLE TO SEE HOW THE DATABASE
IS USED BY THE APPLICATION

IT MINIMIZES THE AREAS WHERE DEVELOPERS NEED
SQL KNOWLEDGE

LIFE EASIER TO DEVELOPERS NOT SKILLED WITH SQL

FOR THE DBA IT PROVIDES A CLEAR SECTION TO SEE HOW
THE DATABASE IS BEING USED

HELPS WITH INDEXES, OPTIMIZATION, AND TO SEE HOW
TO BE REFORMULATED TO PERFORM BETTER
TOOLS TO HELP




DOING THIS KIND OF THING REQUIRES A LOT OF
REPETITIVE TASKS.

WE DO NOT LIKE REPETITIVE TASKS.
ENTER L-MIGRATOR



LOVES CHANGE

SUPPORT DYNAMIC BUSINESS ENVIRONMENTS

PEOPLE LEARN BY TRYING THINGS

EACH DEVELOPER HAS THEIR OWN SANDBOX
WHAT ARE MIGRATIONS ?

KEEP HOLD OF THESE SCRIPT FILES TO PRODUCE A
COMPLETE CHANGE LOG OF ALL THE ALTERATIONS DONE
TO THE DATABASE

UPDATE ANY DATABASE INSTANCE TO THE LATEST
MASTER BY RUNNING THE CHANGE LOG

SEQUENCE AUTOMATED CHANGES IS AN ESSENTIAL
TOOL

AS WELL AS AUTOMATING THE FORWARD CHANGES,
YOU CAN CONSIDER AUTOMATING REVERSE CHANGES
FOR EACH REFACTORING
INSTALLING L-MIGRATOR

FILE EXTENSIONS SETUP PANEL TO ALLOW LASSO TO
PROCESS .CTYP, .DSP, .CNFG AND .LGC FILES.

COPY THE /DBM/ FOLDER (IT STANDS FOR DATABASE
MIGRATOR) INTO YOUR WEB APPLICATION’S ROOT
FOLDER.

OPEN THE MIGRATOR.CNFG FILE AND EDIT THE THREE
CONFIGURATION LINES.

YOU SHOULD BE ABLE TO LOAD THE L-MIGRATOR PAGE
AT YOUR ROOT DOMAIN /DBM/MIGRATOR.LASSO.
WRITING MIGRATIONS SCRIPTS




TYPE NAME SHOULD MATCH FILE NAME (NO EXTENSION)
WRITING MIGRATIONS SCRIPTS




TYPE NAME SHOULD MATCH FILE NAME (NO EXTENSION)
WRITING MIGRATIONS SCRIPTS




TYPE NAME SHOULD MATCH FILE NAME (NO EXTENSION)
WRITING MIGRATIONS SCRIPTS




TYPE NAME SHOULD MATCH FILE NAME (NO EXTENSION)
WRITING MIGRATIONS SCRIPTS




UPDATE TAG SHOWS FORWARD CHANGES
WRITING MIGRATIONS SCRIPTS




UPDATE TAG SHOWS FORWARD CHANGES
WRITING MIGRATIONS SCRIPTS




UPDATE TAG SHOWS FORWARD CHANGES
WRITING MIGRATIONS SCRIPTS




ROLL BACK TAG SHOWS ROLLBACKS OR UNDOS
WRITING MIGRATIONS SCRIPTS




ROLL BACK TAG SHOWS ROLLBACKS OR UNDOS
WRITING MIGRATIONS SCRIPTS




ROLL BACK TAG SHOWS ROLLBACKS OR UNDOS
WRITING MIGRATIONS SCRIPTS
WRITING MIGRATIONS SCRIPTS
WRITING MIGRATIONS SCRIPTS
MIGRATION COMMANDS
MIGRATION COMMANDS
TYPES OF MIGRATIONS
          COMMANDS


ADDTABLE, REMOVETABLE, RENAMETABLE

ADDFIELD, RENAMEFIELD, REMOVEFIELD, MODIFYFIELD

ADDINDEX, REMOVEINDEX

EXECUTE
EXAMPLES OF REAL MIGRATIONS




OPEN TEXT EDITOR FOOL!
COMMON GUIDELINES



TEST YOUR MIGRATIONS

NEVER EDIT A RELEASED MIGRATION

KEEP THEM SHORT AND SWEET

BE MIGRATION DRIVEN
BE MIGRATION DRIVEN


AS A DEVELOPER WRITING SHORT LINES OF CODE IS
EASIER THAN FIRING UP AN EXTERNAL APP, MAKING
CHANGES, SAVING THEM ETC.

PLUS! YOU HAVE TO WRITE THE MIGRATION CODE LATER
ANYWAYS.

HOW MANY TIMES HAVE YOU EMAILED OR DOWNLOADED
AN SQL FILE?
LETS LOOK AT SOME
MIGRATION SCENARIOS
MIGRATIONS UNDER
        VERSION CONTROL



SHOW EXAMPLES

LOCATION AT GITHUB.
HTTP://GITHUB.COM/DJDARKBEAT/L-MIGRATOR/TREE/MASTER

YADA YADA.
CONCLUSION AND
          BIGGER PICTURE

MIGRATIONS ARE YOUR FRIENDS

END CRAZY DATABASE REFACTORINGS

CREATE WAYS TO MANAGE SCHEMA WITHOUT PAID
TOOLS

PART OF PAGEBLOCKS AMAZING FRAMEWORK STARTED
BY GREG WILLITS. ALSO INTEGRATES WITH L-UNIT.

THE TRINITY IS NOW NIKOLAJ DE FINE LICHT, BRIAN
LOOMIS, AND KE CARLTON.
FUN


THERE WAS A YOUNG MAN FROM SOQUEL

WHO THOUGHT HE KNEW ABOUT SQL

HE LEARNED FLAT FILES WERE BAD

AND ABSTRACTED LIKE MAD

AND NO ONE IS HIS EQUAL
RESOURCES

MARTIN FOWLER
HTTP://MARTINFOWLER.COM/ARTICLES/EVODB.HTML

GREG WILLITS SEMI-RETIRED (FROM LASSO)

TAGSWAP
HTTP://WWW.TAGSWAP.NET/ARTICLES

BRIAN LOOMIS AIM DJDARKBEAT

NIKOLAJ (PAGEBLOCKS)

KE (L-UNIT)

More Related Content

Similar to L Migrator Pres

AWS Summit Kuala Lumpur - Opening Keynote by Dr. Werner Vogels
AWS Summit Kuala Lumpur - Opening Keynote by Dr. Werner VogelsAWS Summit Kuala Lumpur - Opening Keynote by Dr. Werner Vogels
AWS Summit Kuala Lumpur - Opening Keynote by Dr. Werner VogelsAmazon Web Services
 
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...Amazon Web Services
 
Dev Ops and PaaS - Accelerate Application Delivery with OpenShift
Dev Ops and PaaS - Accelerate Application Delivery with OpenShiftDev Ops and PaaS - Accelerate Application Delivery with OpenShift
Dev Ops and PaaS - Accelerate Application Delivery with OpenShiftFrederik Bijlsma
 
Let's not rewrite it all
Let's not rewrite it allLet's not rewrite it all
Let's not rewrite it allMichelle Brush
 
Lightweight Business Intelligence with MongoDB
Lightweight Business Intelligence with MongoDBLightweight Business Intelligence with MongoDB
Lightweight Business Intelligence with MongoDBMongoDB
 
Lightweight Business Intelligence with MongoDB
Lightweight Business Intelligence with MongoDBLightweight Business Intelligence with MongoDB
Lightweight Business Intelligence with MongoDBMongoDB
 
The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?Chris Richardson
 
Bee brief-intro-q42016
Bee brief-intro-q42016Bee brief-intro-q42016
Bee brief-intro-q42016wahyu prayudo
 
Best online js training institute in chandigarh and converted
Best  online   js  training institute  in chandigarh  and convertedBest  online   js  training institute  in chandigarh  and converted
Best online js training institute in chandigarh and convertedshubhamrana767862
 
The beginning of the end of the market for all-flash arrays
The beginning of the end of the market for all-flash arrays The beginning of the end of the market for all-flash arrays
The beginning of the end of the market for all-flash arrays NetApp
 
Power up! Mass Migrations at Speed and Scale - Accenture
Power up! Mass Migrations at Speed and Scale - AccenturePower up! Mass Migrations at Speed and Scale - Accenture
Power up! Mass Migrations at Speed and Scale - AccentureAmazon Web Services
 
Dwp from monolithtomicroservices
Dwp from monolithtomicroservicesDwp from monolithtomicroservices
Dwp from monolithtomicroservicesAndrew Rea
 
Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained  Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained Markus Eisele
 
OpenShift: Devops Made Easy
OpenShift: Devops Made EasyOpenShift: Devops Made Easy
OpenShift: Devops Made EasyBent Terp
 
Riding the Second Wave: Open Source for Relational Databases, Enterprise Post...
Riding the Second Wave: Open Source for Relational Databases, Enterprise Post...Riding the Second Wave: Open Source for Relational Databases, Enterprise Post...
Riding the Second Wave: Open Source for Relational Databases, Enterprise Post...EDB
 
Platforms and Microservices - Is There a Middle Ground for Engineers and Tech...
Platforms and Microservices - Is There a Middle Ground for Engineers and Tech...Platforms and Microservices - Is There a Middle Ground for Engineers and Tech...
Platforms and Microservices - Is There a Middle Ground for Engineers and Tech...Dialexa
 
The Digital Transformation Journey for Government - Tim Yeaton
The Digital Transformation Journey for Government - Tim YeatonThe Digital Transformation Journey for Government - Tim Yeaton
The Digital Transformation Journey for Government - Tim Yeatonscoopnewsgroup
 
Modern Application Development v1-0
Modern Application Development  v1-0Modern Application Development  v1-0
Modern Application Development v1-0Greg Hoelzer
 

Similar to L Migrator Pres (20)

AWS Summit Kuala Lumpur - Opening Keynote by Dr. Werner Vogels
AWS Summit Kuala Lumpur - Opening Keynote by Dr. Werner VogelsAWS Summit Kuala Lumpur - Opening Keynote by Dr. Werner Vogels
AWS Summit Kuala Lumpur - Opening Keynote by Dr. Werner Vogels
 
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
 
Introduction to CQRS
Introduction to CQRSIntroduction to CQRS
Introduction to CQRS
 
Dev Ops and PaaS - Accelerate Application Delivery with OpenShift
Dev Ops and PaaS - Accelerate Application Delivery with OpenShiftDev Ops and PaaS - Accelerate Application Delivery with OpenShift
Dev Ops and PaaS - Accelerate Application Delivery with OpenShift
 
Let's not rewrite it all
Let's not rewrite it allLet's not rewrite it all
Let's not rewrite it all
 
Lightweight Business Intelligence with MongoDB
Lightweight Business Intelligence with MongoDBLightweight Business Intelligence with MongoDB
Lightweight Business Intelligence with MongoDB
 
Lightweight Business Intelligence with MongoDB
Lightweight Business Intelligence with MongoDBLightweight Business Intelligence with MongoDB
Lightweight Business Intelligence with MongoDB
 
The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?
 
Bee brief-intro-q42016
Bee brief-intro-q42016Bee brief-intro-q42016
Bee brief-intro-q42016
 
Best online js training institute in chandigarh and converted
Best  online   js  training institute  in chandigarh  and convertedBest  online   js  training institute  in chandigarh  and converted
Best online js training institute in chandigarh and converted
 
The beginning of the end of the market for all-flash arrays
The beginning of the end of the market for all-flash arrays The beginning of the end of the market for all-flash arrays
The beginning of the end of the market for all-flash arrays
 
Power up! Mass Migrations at Speed and Scale - Accenture
Power up! Mass Migrations at Speed and Scale - AccenturePower up! Mass Migrations at Speed and Scale - Accenture
Power up! Mass Migrations at Speed and Scale - Accenture
 
Dwp from monolithtomicroservices
Dwp from monolithtomicroservicesDwp from monolithtomicroservices
Dwp from monolithtomicroservices
 
Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained  Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained
 
OpenShift: Devops Made Easy
OpenShift: Devops Made EasyOpenShift: Devops Made Easy
OpenShift: Devops Made Easy
 
Riding the Second Wave: Open Source for Relational Databases, Enterprise Post...
Riding the Second Wave: Open Source for Relational Databases, Enterprise Post...Riding the Second Wave: Open Source for Relational Databases, Enterprise Post...
Riding the Second Wave: Open Source for Relational Databases, Enterprise Post...
 
Platforms and Microservices - Is There a Middle Ground for Engineers and Tech...
Platforms and Microservices - Is There a Middle Ground for Engineers and Tech...Platforms and Microservices - Is There a Middle Ground for Engineers and Tech...
Platforms and Microservices - Is There a Middle Ground for Engineers and Tech...
 
The Digital Transformation Journey for Government - Tim Yeaton
The Digital Transformation Journey for Government - Tim YeatonThe Digital Transformation Journey for Government - Tim Yeaton
The Digital Transformation Journey for Government - Tim Yeaton
 
Modern Application Development v1-0
Modern Application Development  v1-0Modern Application Development  v1-0
Modern Application Development v1-0
 
AWS Summit Auckland Keynote
AWS Summit Auckland KeynoteAWS Summit Auckland Keynote
AWS Summit Auckland Keynote
 

Recently uploaded

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

L Migrator Pres

  • 1. L-MIGRATOR BRINGING DATABASE MIGRATIONS TO LASSO BRIAN LOOMIS LASSO DEVELOPER CONFERENCE CHICAGO 2008
  • 2. GLUEWARE WHAT’S IN BOISE? HEWLETT PACKARD, MICRON. FOUNDED 9 YEARS AGO, BOISE IDAHO. -1999 SCRIPTING APPLESCRIPT, FILEMAKER, LASSO, ADOBE INDESIGN SERVER. ADOBE PARTNER, APPLE CONSULTANTS NETWORK, LPA.
  • 5. PLAN DRIVEN CYCLES MINIMIZE CHANGES EXTENSIVE UP-FRONT WORK WATERFALL APPROACH RUN INTO TROUBLE IF REQUIREMENTS ARE CHANGING REQUIREMENTS CHURN IS A BIG PROBLEM FOR SUCH PROCESSES
  • 6. AGILE DEVELOPMENT LOVES CHANGE ALLOWING CHANGES TO OCCUR EVEN LATE IN A DEVELOPMENT PROJECT ATTITUDE OF THE PROCESS IS TO ENABLE CHANGE AS MUCH AS POSSIBLE RESPONSE TO THE INHERENT INSTABILITY OF REQUIREMENTS IN MANY PROJECTS BETTER SUPPORT DYNAMIC BUSINESS ENVIRONMENTS
  • 7. A DIFFERENT ATTITUDE TO DESIGN INSTEAD OF THINKING OF DESIGN AS A PHASE - YOU LOOK AT DESIGN AS AN ON-GOING PROCESS INSTEAD OF THE COMMON CHAOS ALLOW EVOLUTIONARY DESIGN TO WORK IN A CONTROLLED MANNER PROVIDE TECHNIQUES TO CONTROL EVOLUTIONARY DESIGN AND MAKE THEM PRACTICAL
  • 8. ITERATIVE DEVELOPMENT RUN THE ENTIRE SOFTWARE LIFE-CYCLE MANY TIMES DURING THE LIFE OF A PROJECT COMPLETING THE ITERATION WITH WORKING, TESTED, INTEGRATED CODE FOR A SMALL SUBSET OF THE REQUIREMENTS OF THE FINAL PRODUCT OTHER SPEAKERS...
  • 9. HOW TO MAKE EVOLUTIONARY DESIGN WORK FOR DATABASES COMPLETING THE ITERATION WITH WORKING, TESTED, INTEGRATED CODE SMALL SUBSET OF THE REQUIREMENTS OF THE FINAL PRODUCT THESE ITERATIONS ARE SHORT, USUALLY RUNNING BETWEEN A WEEK AND A COUPLE OF MONTHS
  • 10. TENETS OF AGILE METHODS PEOPLE WITH DIFFERENT SKILLS AND BACKGROUNDS NEED TO COLLABORATE VERY CLOSELY TOGETHER CAN'T COMMUNICATE MAINLY THROUGH FORMAL MEETINGS AND DOCUMENTS RECOGNIZES THAT PEOPLE LEARN BY TRYING THINGS OUT EACH DEVELOPER TO HAVE THEIR OWN SANDBOX
  • 11. ALL CHANGES ARE DATABASE REFACTORINGS THREE DIFFERENT CHANGES THAT HAVE TO BE DONE TOGETHER: 1) CHANGING THE DATABASE SCHEMA 2) MIGRATING THE DATA IN THE DATABASE 3) CHANGING THE DATABASE ACCESS CODE
  • 12. AUTOMATE THE REFACTORINGS DATABASE REFACTORING IS AUTOMATED BY WRITING IT IN THE FORM OF SQL DDL (FOR THE SCHEMA CHANGE) DML (FOR THE DATA MIGRATION)
  • 13. UPDATE ALL DATABASE DEVELOPERS AUTOMATICALLY UPDATE EVERYONE ON THE PROJECT WHENEVER A CHANGE IS MADE TO THE DATABASE MASTER. SAME REFACTORING SCRIPT THAT UPDATES THE MASTER AUTOMATICALLY UPDATES EVERYONE'S DATABASE
  • 14. CLEARLY SEPARATE ALL DATABASE ACCESS CODE IT'S IMPORTANT TO BE ABLE TO SEE HOW THE DATABASE IS USED BY THE APPLICATION IT MINIMIZES THE AREAS WHERE DEVELOPERS NEED SQL KNOWLEDGE LIFE EASIER TO DEVELOPERS NOT SKILLED WITH SQL FOR THE DBA IT PROVIDES A CLEAR SECTION TO SEE HOW THE DATABASE IS BEING USED HELPS WITH INDEXES, OPTIMIZATION, AND TO SEE HOW TO BE REFORMULATED TO PERFORM BETTER
  • 15. TOOLS TO HELP DOING THIS KIND OF THING REQUIRES A LOT OF REPETITIVE TASKS. WE DO NOT LIKE REPETITIVE TASKS.
  • 16. ENTER L-MIGRATOR LOVES CHANGE SUPPORT DYNAMIC BUSINESS ENVIRONMENTS PEOPLE LEARN BY TRYING THINGS EACH DEVELOPER HAS THEIR OWN SANDBOX
  • 17.
  • 18. WHAT ARE MIGRATIONS ? KEEP HOLD OF THESE SCRIPT FILES TO PRODUCE A COMPLETE CHANGE LOG OF ALL THE ALTERATIONS DONE TO THE DATABASE UPDATE ANY DATABASE INSTANCE TO THE LATEST MASTER BY RUNNING THE CHANGE LOG SEQUENCE AUTOMATED CHANGES IS AN ESSENTIAL TOOL AS WELL AS AUTOMATING THE FORWARD CHANGES, YOU CAN CONSIDER AUTOMATING REVERSE CHANGES FOR EACH REFACTORING
  • 19. INSTALLING L-MIGRATOR FILE EXTENSIONS SETUP PANEL TO ALLOW LASSO TO PROCESS .CTYP, .DSP, .CNFG AND .LGC FILES. COPY THE /DBM/ FOLDER (IT STANDS FOR DATABASE MIGRATOR) INTO YOUR WEB APPLICATION’S ROOT FOLDER. OPEN THE MIGRATOR.CNFG FILE AND EDIT THE THREE CONFIGURATION LINES. YOU SHOULD BE ABLE TO LOAD THE L-MIGRATOR PAGE AT YOUR ROOT DOMAIN /DBM/MIGRATOR.LASSO.
  • 20. WRITING MIGRATIONS SCRIPTS TYPE NAME SHOULD MATCH FILE NAME (NO EXTENSION)
  • 21. WRITING MIGRATIONS SCRIPTS TYPE NAME SHOULD MATCH FILE NAME (NO EXTENSION)
  • 22. WRITING MIGRATIONS SCRIPTS TYPE NAME SHOULD MATCH FILE NAME (NO EXTENSION)
  • 23. WRITING MIGRATIONS SCRIPTS TYPE NAME SHOULD MATCH FILE NAME (NO EXTENSION)
  • 24. WRITING MIGRATIONS SCRIPTS UPDATE TAG SHOWS FORWARD CHANGES
  • 25. WRITING MIGRATIONS SCRIPTS UPDATE TAG SHOWS FORWARD CHANGES
  • 26. WRITING MIGRATIONS SCRIPTS UPDATE TAG SHOWS FORWARD CHANGES
  • 27. WRITING MIGRATIONS SCRIPTS ROLL BACK TAG SHOWS ROLLBACKS OR UNDOS
  • 28. WRITING MIGRATIONS SCRIPTS ROLL BACK TAG SHOWS ROLLBACKS OR UNDOS
  • 29. WRITING MIGRATIONS SCRIPTS ROLL BACK TAG SHOWS ROLLBACKS OR UNDOS
  • 35. TYPES OF MIGRATIONS COMMANDS ADDTABLE, REMOVETABLE, RENAMETABLE ADDFIELD, RENAMEFIELD, REMOVEFIELD, MODIFYFIELD ADDINDEX, REMOVEINDEX EXECUTE
  • 36. EXAMPLES OF REAL MIGRATIONS OPEN TEXT EDITOR FOOL!
  • 37. COMMON GUIDELINES TEST YOUR MIGRATIONS NEVER EDIT A RELEASED MIGRATION KEEP THEM SHORT AND SWEET BE MIGRATION DRIVEN
  • 38. BE MIGRATION DRIVEN AS A DEVELOPER WRITING SHORT LINES OF CODE IS EASIER THAN FIRING UP AN EXTERNAL APP, MAKING CHANGES, SAVING THEM ETC. PLUS! YOU HAVE TO WRITE THE MIGRATION CODE LATER ANYWAYS. HOW MANY TIMES HAVE YOU EMAILED OR DOWNLOADED AN SQL FILE?
  • 39. LETS LOOK AT SOME MIGRATION SCENARIOS
  • 40. MIGRATIONS UNDER VERSION CONTROL SHOW EXAMPLES LOCATION AT GITHUB. HTTP://GITHUB.COM/DJDARKBEAT/L-MIGRATOR/TREE/MASTER YADA YADA.
  • 41. CONCLUSION AND BIGGER PICTURE MIGRATIONS ARE YOUR FRIENDS END CRAZY DATABASE REFACTORINGS CREATE WAYS TO MANAGE SCHEMA WITHOUT PAID TOOLS PART OF PAGEBLOCKS AMAZING FRAMEWORK STARTED BY GREG WILLITS. ALSO INTEGRATES WITH L-UNIT. THE TRINITY IS NOW NIKOLAJ DE FINE LICHT, BRIAN LOOMIS, AND KE CARLTON.
  • 42. FUN THERE WAS A YOUNG MAN FROM SOQUEL WHO THOUGHT HE KNEW ABOUT SQL HE LEARNED FLAT FILES WERE BAD AND ABSTRACTED LIKE MAD AND NO ONE IS HIS EQUAL
  • 43. RESOURCES MARTIN FOWLER HTTP://MARTINFOWLER.COM/ARTICLES/EVODB.HTML GREG WILLITS SEMI-RETIRED (FROM LASSO) TAGSWAP HTTP://WWW.TAGSWAP.NET/ARTICLES BRIAN LOOMIS AIM DJDARKBEAT NIKOLAJ (PAGEBLOCKS) KE (L-UNIT)