Skip to content

Commit

Permalink
Moved redesign idea specs into their own directory
Browse files Browse the repository at this point in the history
  • Loading branch information
fubar-coder committed May 3, 2018
1 parent d458a5b commit 1e471f3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
@@ -0,0 +1,36 @@
# Redesign of [IColumn](xref:FluentMigrator.Runner.Generators.IColumn)

# Current state

- Only differentiates between column creation and column
alteration, but there are two ways to create a column
and some databases (I'm looking at you, DB2) have a
different syntax for both.
- Difficult to change the order (some anonymous lambda array)

# Use cases

## Primary use cases

- Column definition in `CREATE TABLE`
- Column definition in `ALTER TABLE ... ADD COLUMN`
- Column definition in `ALTER TABLE ... ALTER COLUMN`

## Secondary use cases

- `PRIMARY KEY` constraint
- `FOREIGN KEY` constraint
- Other constraints (optional)

# How to fix it

Just some random ideas:

- Using SQL fragments
- SQL fragments wrapped in classes
- Pattern matching

# Open questions

- Maybe different API for all three use cases?
- How to handle the seconday use cases?
Expand Up @@ -25,7 +25,7 @@
- When `RequireAll` attributes exist and all `RequireAll` flagged `TagsAttribute`s are in the specified list of tags, then the migration gets used
- When `RequireAny` attribute exists and at least one `RequireAny` flagged `TagsAttribute` is in the specified list of tags, then the migration gets used
- A match for `RequireAll` skips the check for ´RequireAny`

## Migration Traits

- Specified by `MigrationTraitAttribute`
Expand Down

0 comments on commit 1e471f3

Please sign in to comment.