WordPress.org

Make WordPress Core

Opened 11 months ago

Last modified 4 months ago

#44767 reviewing enhancement

dbDelta allow spaces between column names and between lines

Reported by: soulseekah Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch has-unit-tests
Focuses: Cc:

Description (last modified by soulseekah)

SQL is hard :( make it accept nicer schema definitions with arbitrary space alignments, blank lines, etc.

Attachments (3)

44767-ignore_change_with_space_between_column_and_type.diff (1.5 KB) - added by soulseekah 11 months ago.
44767-test_ignore_empty_lines_completely.diff (1.3 KB) - added by soulseekah 11 months ago.
44767.diff (2.4 KB) - added by soulseekah 11 months ago.
2-in-1

Download all attachments as: .zip

Change History (13)

#1 @soulseekah
11 months ago

  • 44767-ignore_change_with_space_between_column_and_type.diff

Allows the schema to be written with spaces and tabs between the column name and the type.

`id`   INT,
`name` TEXT,
  • 44767-test_ignore_empty_lines_completely.diff

Allows the inclusion of empty lines in the SQL:

`id` INT,
`name` TEXT,

PRIMARY KEY (`id`)
Last edited 11 months ago by soulseekah (previous) (diff)

#2 follow-up: @soulseekah
11 months ago

  • Keywords has-patch has-unit-tests added

Let me know if I should merge them into one.

#3 @soulseekah
11 months ago

  • Description modified (diff)
  • Summary changed from Some dbDelta improvements to dbDelta allow spaces between column names and between lines

#4 @netweb
11 months ago

Related: #36924 dbDelta(): Support more than one whitespace between field name and its type definition

#5 in reply to: ↑ 2 @SergeyBiryukov
11 months ago

Replying to soulseekah:

Let me know if I should merge them into one.

Yes, please, the patch and the tests should generally be in the same file.

@soulseekah
11 months ago

2-in-1

#6 @soulseekah
11 months ago

@SergeyBiryukov these are two different patches one dealing with whitespace, the other newlines, each with tests inside them. They can be applied separately but I attatched both as one changeset.

Last edited 11 months ago by soulseekah (previous) (diff)

#7 @SergeyBiryukov
11 months ago

  • Milestone changed from Awaiting Review to 5.0
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#8 @pento
9 months ago

  • Milestone changed from 5.0 to 5.1

#9 @pento
6 months ago

  • Milestone changed from 5.1 to 5.2

#10 @desrosj
4 months ago

  • Milestone changed from 5.2 to 5.3

This ticket has not received any attention during the 5.2 cycle. With beta 1 tomorrow, going to punt this to 5.3.

Note: See TracTickets for help on using tickets.