-
-
Notifications
You must be signed in to change notification settings - Fork 10
Typecast refactoring #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Typecast refactoring #260
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1b72206
Typecast refactoring
Tigrov 0335ea8
Fix test issues
Tigrov 0c2a962
Fix test issues
Tigrov 741e93f
Fix test issues
Tigrov e082299
Fix test issues
Tigrov 74a7b50
Fix test issues
Tigrov 9e455ca
Fix test issues
Tigrov 09fd7cf
Rename `$columnSchema` to `$column`
Tigrov 0c146f5
Update
Tigrov f792bcc
Update
Tigrov f1f9006
Add test `DEFAULT CURRENT_TIMESTAMP` for `text` field
Tigrov 1ae0d8e
Add test `DEFAULT CURRENT_TIMESTAMP` for `text` field
Tigrov 893f367
Fix tests issue
Tigrov 942033f
Add line to changelog
Tigrov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/yiitest.sq3 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need add check for type of column. Without check type of column - with default value in column equal 'CURRENT_TIMESTAMP' (string), default value will be incorrect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no special date type
timestamp
ordatetime
in SQlite.https://www.sqlite.org/datatype3.html
For this purpose
text
type can be used.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/yiisoft/db-sqlite/blob/master/tests/Provider/SchemaProvider.php#L162
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have dbtype in schema of column, and need check type in condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added test with
STRICT
table whereTIMESTAMP
type is not allowed butTEXT
type for storing date and time is okey.Could you show a test where current changes without
check for type of column
will fail?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test will be more reliable. Simply add test for column text_col with assert: defaultValue not instaceof Expression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current test is sufficient. Make it work without errors and that's it. Thank you