Make WordPress Core

Opened 6 years ago

Last modified 5 years ago

#44767 reviewing enhancement

dbDelta allow spaces between column names and between lines

Reported by: soulseekah's profile soulseekah Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Future Release 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 6 years ago.
44767-test_ignore_empty_lines_completely.diff (1.3 KB) - added by soulseekah 6 years ago.
44767.diff (2.4 KB) - added by soulseekah 6 years ago.
2-in-1

Download all attachments as: .zip

Change History (15)

#1 @soulseekah
6 years 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 6 years ago by soulseekah (previous) (diff)

#2 follow-up: @soulseekah
6 years ago

  • Keywords has-patch has-unit-tests added

Let me know if I should merge them into one.

#3 @soulseekah
6 years ago

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

#4 @netweb
6 years ago

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

#5 in reply to: ↑ 2 @SergeyBiryukov
6 years 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
6 years ago

2-in-1

#6 @soulseekah
6 years 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 6 years ago by soulseekah (previous) (diff)

#7 @SergeyBiryukov
6 years ago

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

#8 @pento
6 years ago

  • Milestone changed from 5.0 to 5.1

#9 @pento
6 years ago

  • Milestone changed from 5.1 to 5.2

#10 @desrosj
6 years 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.

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


5 years ago

#12 @davidbaumwald
5 years ago

  • Milestone changed from 5.3 to Future Release

This ticket needs reviewing. With version 5.3 Beta 1 landing in a few hours, I'm moving this to Future Release.

Note: See TracTickets for help on using tickets.