Skip to content

(Draft) Trying to fix BIGINT issues - #116

Closed
0xFEEDC0DE64 wants to merge 1 commit into
PostgreSQL-For-Wordpress:v3from
0xFEEDC0DE64:fix_capital_numeric_types
Closed

(Draft) Trying to fix BIGINT issues#116
0xFEEDC0DE64 wants to merge 1 commit into
PostgreSQL-For-Wordpress:v3from
0xFEEDC0DE64:fix_capital_numeric_types

Conversation

@0xFEEDC0DE64

Copy link
Copy Markdown

I think we should not only cover BIGINT and not only in CREATE TABLE statements...

but this is for now what fixes my problem with wp-statistics

@mattbucci

Copy link
Copy Markdown
Collaborator

Most of these regexes are already case insensitive.

I think we can just add an "i" to the end of

$pattern = "/(" . $numeric_types_imploded . ")\(\d+\)/";

This should make this case insensitive and either bigint variation should match

@mattbucci mattbucci left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make regexes match insensitively

@mattbucci

mattbucci commented Apr 10, 2024

Copy link
Copy Markdown
Collaborator

Looks like we have a failing test, but it's the test itself that is incorrect.

1) rewriteTest::test_it_removes_character_sets
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
platform varchar(255),
version varchar(255),
location varchar(10),
- user_id BIGINT(48) NOT NULL,
- page_id BIGINT(48) NOT NULL,
+ user_id BIGINT NOT NULL,
+ page_id BIGINT NOT NULL,

@mattbucci mattbucci closed this Oct 17, 2024
@0xFEEDC0DE64

Copy link
Copy Markdown
Author

Have you found another solution for this problem?

@mattbucci

Copy link
Copy Markdown
Collaborator

See #131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants