Exemplo n.º 1
0
            public MigrationFromFile(string migrationFilePath)
            {
                MigrationFilePath = migrationFilePath;
                var migrationId = MigrationId.GetMigrationId(migrationFilePath);

                Id                  = migrationId.GetPureId();
                SequenceNumber      = migrationId.SequenceNumber;
                BranchSpecification = migrationId.BranchSpecification;

                var lines = File.ReadAllLines(migrationFilePath);

                Description  = ExtractDescription(lines);
                Sql          = ExtractMigration(lines);
                SqlMigration = this;
            }
Exemplo n.º 2
0
        static bool MathchesMigrationIdPattern(string filePath)
        {
            var migrationId = MigrationId.GetMigrationId(filePath, throwOnError: false);

            return(migrationId != null);
        }