diff --git a/.github/workflows/DemoToMainMigration.yml b/.github/workflows/DemoToMainMigration.yml index 3469c30..c09ed91 100644 --- a/.github/workflows/DemoToMainMigration.yml +++ b/.github/workflows/DemoToMainMigration.yml @@ -31,8 +31,14 @@ jobs: - name: Ensure demo branch is up-to-date run: | - git checkout -- demo - git pull --ff-only origin demo || { echo "Error pulling demo branch"; exit 1; } + if git ls-remote --exit-code --heads origin demo; then + git fetch origin demo # Asegura que la rama demo esté disponible en local + git checkout demo || git checkout -b demo origin/demo # Checkout demo si existe o crea la rama localmente + git pull --ff-only origin demo || { echo "Error pulling demo branch"; exit 1; } + else + echo "Branch 'demo' does not exist in the remote repository." + exit 1 + fi - name: Copy migration files from demo to temporary folder run: | diff --git a/demo/flyway.toml b/demo/flyway.toml index 19f658d..d010272 100644 --- a/demo/flyway.toml +++ b/demo/flyway.toml @@ -1,5 +1,5 @@ databaseType = "SqlServer" -id = "dc11b21e-7756-4c3f-83f4-bc7e7a76bbec" +id = "9e6d3d79-9e7f-4de8-8b2c-3a761b270402" name = "demo" [flyway] diff --git a/test/migrations/V1.1__Add_Description_To_Brand.sql b/demo/migrations/V1.1__Add_Description_To_Brand.sql similarity index 64% rename from test/migrations/V1.1__Add_Description_To_Brand.sql rename to demo/migrations/V1.1__Add_Description_To_Brand.sql index 8ebf07c..23a602c 100644 --- a/test/migrations/V1.1__Add_Description_To_Brand.sql +++ b/demo/migrations/V1.1__Add_Description_To_Brand.sql @@ -1,2 +1,2 @@ -ALTER TABLE Brand + ALTER TABLE Brand ADD Description NVARCHAR(500) NULL; \ No newline at end of file diff --git a/demo/migrations/V1.2__Remove_Description_From_Brand.sql b/demo/migrations/V1.2__Remove_Description_From_Brand.sql new file mode 100644 index 0000000..4d0cb4f --- /dev/null +++ b/demo/migrations/V1.2__Remove_Description_From_Brand.sql @@ -0,0 +1,2 @@ +ALTER TABLE Brand +DROP COLUMN Description; \ No newline at end of file diff --git a/test/migrations/V1__Create_Brand_Table.sql b/demo/migrations/V1__Create_Brand_Table.sql similarity index 100% rename from test/migrations/V1__Create_Brand_Table.sql rename to demo/migrations/V1__Create_Brand_Table.sql diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index 8755e7a..0000000 --- a/test/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ - -# Flyway ignores -*.user.toml -*.artifact -report.html -report.json \ No newline at end of file diff --git a/test/Filter.scpf b/test/Filter.scpf deleted file mode 100644 index 10bcf22..0000000 --- a/test/Filter.scpf +++ /dev/null @@ -1,153 +0,0 @@ - - - Filter - - False - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE -
- - True - - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - - - True - TRUE - -
-
-
diff --git a/test/flyway.toml b/test/flyway.toml deleted file mode 100644 index 888f650..0000000 --- a/test/flyway.toml +++ /dev/null @@ -1,120 +0,0 @@ -databaseType = "SqlServer" -id = "3ba257cb-eb1e-490d-832f-e63b6d804641" -name = "test" - -[flyway] -defaultSchema = "dbo" -locations = [ "filesystem:migrations" ] -mixed = true -outOfOrder = true -schemaModelLocation = "schema-model" -validateMigrationNaming = true - - [flyway.check] - majorTolerance = 0 - -[flyway.sqlserver.clean] -mode = "all" - -[flywayDesktop] -developmentEnvironment = "development" -shadowEnvironment = "shadow" - -[redgateCompare] -filterFile = "filter.rgf" - - [redgateCompare.sqlserver] - filterFile = "Filter.scpf" - -[redgateCompare.sqlserver.data.options.comparison] -compressTemporaryFiles = false -forceBinaryCollation = false -treatEmptyStringAsNull = false -trimTrailingWhiteSpace = false -useChecksumComparison = false -useMaxPrecisionForFloatComparison = false - -[redgateCompare.sqlserver.data.options.deployment] -disableDdlTriggers = true -disableDmlTriggers = false -disableForeignKeys = false -dontIncludeCommentsInScript = false -dropPrimaryKeysIndexesAndUniqueConstraints = false -reseedIdentityColumns = false -skipIntegrityChecksForForeignKeys = false -transportClrDataTypesAsBinary = false - -[redgateCompare.sqlserver.data.options.mapping] -includeTimestampColumns = false -useCaseSensitiveObjectDefinition = true - -[redgateCompare.sqlserver.options.behavior] -addCreateOrAlterForRerunnableScripts = false -addDropAndCreateForRerunnableScripts = false -addNoPopulationToFulltextIndexes = false -addObjectExistenceChecks = false -addOnlineOnWhenCreatingIndexesOrAlteringColumns = false -addWithEncryption = false -considerNextFilegroupInPartitionSchemes = true -decryptEncryptedObjects = true -disableAutoColumnMapping = false -dontUseAlterAssemblyToChangeClrObjects = false -forbidDuplicateTableStorageSettings = false -forceColumnOrder = false -ignoreMigrationScripts = false -includeDependencies = true -includeRoleExistenceChecks = true -includeSchemaExistenceChecks = true -inlineFulltextFields = false -inlineTableObjects = false -useCaseSensitiveObjectDefinition = false -useDatabaseCompatibilityLevel = false -useSetStatementsInScriptDatabaseInfo = false -writeAssembliesAsDlls = false - -[redgateCompare.sqlserver.options.ignores] -ignoreAuthorizationOnSchemaObjects = false -ignoreBindings = false -ignoreChangeTracking = false -ignoreCollations = true -ignoreComments = false -ignoreDataCompression = true -ignoreDataSyncSchema = false -ignoreDatabaseAndServerNameInSynonyms = true -ignoreDmlTriggers = false -ignoreDynamicDataMasking = false -ignoreEventNotificationsOnQueues = false -ignoreExtendedProperties = false -ignoreFileGroupsPartitionSchemesAndPartitionFunctions = true -ignoreFillFactorAndIndexPadding = true -ignoreFullTextIndexing = false -ignoreIdentitySeedAndIncrementValues = false -ignoreIndexes = false -ignoreInsteadOfTriggers = false -ignoreInternallyUsedMicrosoftExtendedProperties = false -ignoreLockPropertiesOfIndexes = false -ignoreNocheckAndWithNocheck = false -ignoreNotForReplication = true -ignoreNullabilityOfColumns = false -ignorePerformanceIndexes = false -ignorePermissions = false -ignoreReplicationTriggers = true -ignoreSchemas = false -ignoreSensitivityClassifications = false -ignoreSetQuotedIdentifierAndSetAnsiNullsStatements = false -ignoreSquareBracketsInObjectNames = false -ignoreStatistics = true -ignoreStatisticsIncremental = false -ignoreStatisticsNoRecomputePropertyOnIndexes = false -ignoreSynonymDependencies = false -ignoreSystemNamedConstraintAndIndexNames = false -ignoreTsqltFrameworkAndTests = true -ignoreUserProperties = true -ignoreUsersPermissionsAndRoleMemberships = true -ignoreWhiteSpace = true -ignoreWithElementOrder = true -ignoreWithEncryption = false -ignoreWithNoCheck = true - -[environments.test] -url = "jdbc:sqlserver://1IHTPORTHV4H\\SQLEXPRESS;databaseName=prueba;encrypt=true;integratedSecurity=true;trustServerCertificate=true"