Open lewismoten opened 4 months ago
Thanks for all the work you have done @lewismoten . I will review each of the PRs and merge them one by one. I had made this package while I was working on something and felt the need to make a mysql migration package. Never thought it would go this far :)
I didn't realize you were still maintaining the project. Thank you for making this available. I'm more familiar with Active Record with Ruby on Rails, and this is similar to how it managed database changes over time. I've got a separate project that is dedicated to the architecture of the database only. It migrates the development database any time changes are pushed to the develop
branch via GitHub Actions, and this works well with it.
I've made a few more changes outside of the PR's on my own fork along with starting to do some refactoring.
The main updates were:
data.sql
for lookup data (excludes migration table)migration run 1716831766170 up
run <timestamp>
in migration tableschema.sql
file:
--skip-dump-date
Since we have a repository that tracks dates. Otherwise every up
command kept showing the schema.sql
file changed when only the date changed. -- Dump completed on 2024-05-29 22:04:07
--skip-comments
-- MariaDB dump 10.19-11.3.2-MariaDB, for osx10.19 (arm64)
--
-- Host: localhost Database: local_test
-- ------------------------------------------------------
-- Server version 11.3.2-MariaDB
--
-- Table structure for table `mysql_migrations_347ertt3e`
--
-- Dump completed
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
definer
when creating procedures and functions since a different user exists on the develop database
CREATE DEFINER=`root`@`localhost` FUNCTION `uuid4`() RETURNS char(36) CHARSET utf8mb4 COLLATE utf8mb4_general_ci
readme.md
as bash
or JavaScript
for syntax highlighting--argv
option to override process.argv
for testing
Given that this project hasn't had any activity over the past few years, I'm under the impression that it has been abandoned. If this is not the case, let me know. In the meantime, I've made several changes and bug fixes (hanging, processing non-js files, etc) on my own fork and published it. Many of the changes have been opened as PR's to merge back into this repository as well.
Here is an example of some of the configuration changes that lets you save your seed data, procedures, functions, events, log threshold, and a custom logger. I also added the ability to override the
process.argv
via the options array.If @kawadhiya21 would prefer, I'd like to get these changes back into the original mysql-migrations repository here.
Here is an example of
.templatejs
. I wanted a custom template so I could get highlighting of SQL queries to show up properly in my IDE.