aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/db_tools.php
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'exreaction/ticket/11350' into developIgor Wiedler2013-02-071-1/+1
|\ | | | | | | | | * exreaction/ticket/11350: [ticket/11350] Do not pass $db by reference; typehint phpbb_db_driver
| * [ticket/11350] Do not pass $db by reference; typehint phpbb_db_driverNathaniel Guse2013-02-061-1/+1
| | | | | | | | PHPBB3-11350
* | Merge remote-tracking branch 'EXreaction/feature/migrations' into developDavid King2013-02-061-0/+13
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * EXreaction/feature/migrations: (48 commits) [feature/migrations] Remove default values from necessary parameters [feature/migrations] Revert unrelated changes to functions.php [ticket/9737] Fix some comments [ticket/9737] Fix a few minor things in migrations [feature/migrations] Make sure migration data not done before running data step [feature/migrations] Function to populate the migrations table (for install) [feature/migrations] Function effectively_installed() in migrations [feature/migrations] Make load_migrations recursive (optionally) [feature/migrations] Make the test depends_on methods static [feature/migrations] Make depends_on static to call it without dependencies [feature/migrations] install/database_update_migrations.php [feature/migrations] Move test.php -> install/database_update_migrations.php [feature/migrations] Store depends on in the database (serialized) [feature/migrations] Revert method completed [feature/migrations] Basic reverting test [feature/migrations] Test for calling a step multiple times [feature/migrations] Creating revert method to attempt reverting a migration [feature/migrations] Some comments in db_tools [feature/migrations] Reverse data functionality [feature/migrations] Comment ... Conflicts: phpBB/install/schemas/firebird_schema.sql phpBB/install/schemas/mssql_schema.sql phpBB/install/schemas/mysql_40_schema.sql phpBB/install/schemas/mysql_41_schema.sql phpBB/install/schemas/oracle_schema.sql phpBB/install/schemas/postgres_schema.sql phpBB/install/schemas/sqlite_schema.sql
| * [feature/migrations] Some comments in db_toolsNathan Guse2013-01-091-0/+2
| | | | | | | | PHPBB3-9737
| * [feature/migrations] Fixing returns of callables and handling data stateNathan Guse2013-01-091-0/+1
| | | | | | | | | | | | Lots of comments and some other miscellaneous fixes. PHPBB3-9737
| * [feature/migrations] Move migrator to service containerNathan Guse2013-01-091-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Version numbers 3.1 updates Restore database_update.php file to what it was in develop Get first forum to place global announcements in PHPBB3-9737
* | Merge remote-tracking branch 'remotes/Sajaki/ticket/10854' into developNathan Guse2013-01-151-0/+16
|\ \ | |/ |/| | | | | | | | | # By Sajaki # Via Sajaki * remotes/Sajaki/ticket/10854: [ticket/10854] sql server drop default constraint when dropping column
| * [ticket/10854] sql server drop default constraint when dropping columnSajaki2012-04-281-0/+16
| | | | | | | | | | | | drops default columns with T-SQL before attempting drop column to avoids sql exception. This is a huge annoyance in UMIL scripts running under sql server.
* | [ticket/11015] Change more docblocks.Oleg Pudeyev2012-12-041-1/+1
| | | | | | | | PHPBB3-11015
* | [feature/sphinx-fulltext-search] remove note from db_toolsDhruv2012-07-211-1/+0
| | | | | | | | | | | | | | Note saying db_tools not being used currently is remove from db_tools.php We utilize db_tools in sphinx search. PHPBB3-10946
* | [ticket/10847] fixing all misspelled "dependant" to "dependent"Senky2012-04-301-1/+1
| | | | | | | | PHPBB3-10847
* | Merge branch 'develop-olympus' into developNils Adermann2012-04-101-1/+1
|\ \ | |/ | | | | | | | | * develop-olympus: [ticket/10774] Correctly specify index name when creating unique index on MySQL. [ticket/10774] Add unit tests for UNIQUE index existence and creation.
| * [ticket/10774] Correctly specify index name when creating unique index on MySQL.Andreas Fischer2012-04-101-1/+1
| | | | | | | | PHPBB3-10774
* | [ticket/9916] Updating header license and removing Version $Id$Unknown2011-12-311-2/+1
| | | | | | | | PHPBB3-9916
* | Merge branch 'develop-olympus' into developIgor Wiedler2011-10-141-1/+1
|\ \ | |/ | | | | | | | | * develop-olympus: [ticket/10327] Use $this->tools instead of creating a new instance of db_tools. [ticket/10327] Also change CREATE UNIQUE INDEX to use ALTER TABLE.
| * Merge remote-tracking branch 'bantu/ticket/10327' into develop-olympusIgor Wiedler2011-10-141-1/+1
| |\ | | | | | | | | | | | | | | | * bantu/ticket/10327: [ticket/10327] Use $this->tools instead of creating a new instance of db_tools. [ticket/10327] Also change CREATE UNIQUE INDEX to use ALTER TABLE.
| | * [ticket/10327] Also change CREATE UNIQUE INDEX to use ALTER TABLE.Andreas Fischer2011-10-141-1/+1
| | | | | | | | | | | | PHPBB3-10327
* | | Merge branch 'develop-olympus' into developNils Adermann2011-10-141-74/+97
|\ \ \ | |/ / | | | | | | | | | | | | * develop-olympus: [ticket/8240] Add ability to get a list of columns of a tables to db_tools. [ticket/8240] Add ability to get a list of tables to db_tools.
| * | [ticket/8240] Add ability to get a list of columns of a tables to db_tools.Andreas Fischer2011-10-141-74/+37
| | | | | | | | | | | | PHPBB3-8240
| * | [ticket/8240] Add ability to get a list of tables to db_tools.Andreas Fischer2011-10-141-0/+60
| |/ | | | | | | PHPBB3-8240
* | Merge branch 'develop-olympus' into developIgor Wiedler2011-10-141-1/+1
|\ \ | |/ | | | | | | * develop-olympus: [ticket/10327] Change CREATE INDEX to ALTER TABLE table ADD INDEX for MySQL.
| * [ticket/10327] Change CREATE INDEX to ALTER TABLE table ADD INDEX for MySQL.Andreas Fischer2011-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * CREATE INDEX is internally mapped to an ALTER INDEX statement. * CREATE INDEX requires the INDEX permission. * ALTER TABLE requires the (more powerful) ALTER permission. * We require the ALTER permission anyway for operation. * Changing CREATE INDEX to ALTER TABLE thus removes dependency on the INDEX permission which is good because some management software does not give out the INDEX permission by default. http://dev.mysql.com/doc/refman/5.0/en/create-index.html PHPBB3-10327
* | Merge branch 'develop-olympus' into developAndreas Fischer2011-09-061-1/+2
|\ \ | |/ | | | | | | | | | | * develop-olympus: [ticket/10352] Add missing break for Oracle's sql_table_drop() [ticket/10351] Fix Oracle's sql_column_remove() [ticket/10294] Fix sql_affectedrows() in mssqlnative driver.
| * Merge remote-tracking branch 'Noxwizard/ticket/10351' into develop-olympusAndreas Fischer2011-09-061-1/+1
| |\ | | | | | | | | | | | | * Noxwizard/ticket/10351: [ticket/10351] Fix Oracle's sql_column_remove()
| | * [ticket/10351] Fix Oracle's sql_column_remove()Patrick Webster2011-09-041-1/+1
| | | | | | | | | | | | | | | | | | The correct syntax is DROP COLUMN. PHPBB3-10351
| * | [ticket/10352] Add missing break for Oracle's sql_table_drop()Patrick Webster2011-09-041-0/+1
| |/ | | | | | | PHPBB3-10352
* | Merge branch 'develop-olympus' into developJoas Schilling2011-08-291-0/+17
|\ \ | |/ | | | | | | * develop-olympus: [ticket/10346] Add drop_tables to perform_schema_changes and add tests
| * [ticket/10346] Add drop_tables to perform_schema_changes and add testsNils Adermann2011-08-291-0/+17
| | | | | | | | PHPBB3-10346
* | Merge branch 'develop-olympus' into developJoas Schilling2011-07-141-2/+2
|\ \ | |/ | | | | | | * develop-olympus: [ticket/10267] Call strlen() on $table_prefix for $max_length calculation.
| * [ticket/10267] Call strlen() on $table_prefix for $max_length calculation.Andreas Fischer2011-07-141-2/+2
| | | | | | | | PHPBB3-10267
* | Merge branch 'develop-olympus' into developAndreas Fischer2011-06-131-2/+2
|\ \ | |/ | | | | | | * develop-olympus: [ticket/10214] Correct Oracle create table query syntax in db_tools
| * [ticket/10214] Correct Oracle create table query syntax in db_toolsNils Adermann2011-06-131-2/+2
| | | | | | | | | | | | | | | | Removes the semicolon at end of oracle CREATE TABLE queries and adds a semicolon to the end of a SELECT query inside of the trigger for a new table's auto increment column before the end keyword PHPBB3-10214
* | Merge branch 'develop-olympus' into developAndreas Fischer2011-06-121-1/+31
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * develop-olympus: [ticket/9892] Correct copyright year [ticket/9892] Remove incorrect use of camel case [ticket/9892] Removing closing php tag from create_schema_files [ticket/9892] Transaction support for database update sql execution function [ticket/9892] count is a keyword in firebird, so renaming this alias [ticket/9892] Q&A CAPTCHA did not work on firebird, so no need to change config [ticket/9892] Shorten login_attempt key names to avoid firebird length problems [ticket/9892] Drop Q&A CAPTCHA tables if left in inconsistent state [ticket/9892] Adding a number of tests for db_tools [ticket/9892] Table prefix lengths influence index lengths in db_tools [ticket/9892] Shorten the index names on the q&a captcha [ticket/9892] column & index name limits, firebird auto increment in db_tools Conflicts: phpBB/develop/create_schema_files.php
| * [ticket/9892] Table prefix lengths influence index lengths in db_toolsNils Adermann2011-06-121-5/+9
| | | | | | | | PHPBB3-9892
| * [ticket/9892] column & index name limits, firebird auto increment in db_toolsNils Adermann2011-06-121-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Column names are limited to 30 characters - Index names are limited to 31 characters. On some dbms the index name contains both table name and actual index name so the limit applies to the sum of the lenghts of table name and index name. - Auto incremented column names are limited to 26 characters to provide an additional 4 characters for sequence names The code for firebird auto increment support using generators/sequences with triggers was copied from create_schema_files.php PHPBB3-9892
* | Merge branch 'develop-olympus' into developAndreas Fischer2011-06-111-0/+13
|\ \ | |/ | | | | | | | | | | | | | | * develop-olympus: [ticket/9992] Clarify explanations of ip and account limits on login [ticket/9992] Add a comma to language for IP_LOGIN_LIMIT_MAX_EXPLAIN [ticket/9992] Use sql_fetchfield for single row and single column result [ticket/9992] Adding a limit on login attempts per IP. [ticket/9992] Make sql_create_table and sql_table_exists available in updater
| * [ticket/9992] Adding a limit on login attempts per IP.Nils Adermann2011-06-101-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | A new table was created to save all failed login attempts with corresponding information on username, ip and useragent. By default the limit is 50 login attempts within 6 hours per IP. The limit is relatively high to avoid big problems on sites behind a reverse proxy that don't receive the forwarded-for value as REMOTE_ADDR but see all users as coming from the same IP address. But if these users run into problems a special forwarded-for option is available to limit logins by forwarded-for value instead of ip. PHPBB3-9992
* | Merge branch 'develop-olympus' into developNils Adermann2011-05-051-4/+258
|\ \ | |/ | | | | | | | | | | | | | | | | | | * develop-olympus: [ticket/10003] Delete EOL at EOF for the benefit of 3.0 modifications. [ticket/10003] Ported 1802b9ff9286a7fc24493e71b3432816cbdbfcd8 to db_tools. [ticket/10003] Ported 5553cfc2ed81ba9eb571804c431def962720b39e to db_tools. [ticket/10003] Ported 023760c8b2402418310a3717db8349cac0342e42 to db_tools. [ticket/10003] Ported 54c22ae52a0e18232cac8fed342ea52f2e2a793d to db_tools. [ticket/10003] Ported 96a30afcca3ebd832c9b3083bb5c9a9f2a2dc54b to db_tools. [ticket/10003] Ported d7d96223e7bae7cd60b13c6e7896d95838c3633c to db_tools.
| * [ticket/10003] Delete EOL at EOF for the benefit of 3.0 modifications.Oleg Pudeyev2011-04-291-1/+1
| | | | | | | | PHPBB3-10003
| * [ticket/10003] Ported 1802b9ff9286a7fc24493e71b3432816cbdbfcd8 to db_tools.Oleg Pudeyev2011-04-291-2/+2
| | | | | | | | | | | | | | Most of it was already in db_tools, these changes could have applied to code that did not exist in db_tools at the time of the commit. PHPBB3-10003
| * [ticket/10003] Ported 5553cfc2ed81ba9eb571804c431def962720b39e to db_tools.Oleg Pudeyev2011-04-291-4/+12
| | | | | | | | | | | | The diff in database_update was only partially relevant. PHPBB3-10003
| * [ticket/10003] Ported 023760c8b2402418310a3717db8349cac0342e42 to db_tools.Oleg Pudeyev2011-04-291-6/+137
| | | | | | | | | | | | | | This was painful. Git wanted to patch hunks in wrong places. Hopefully I got it right. PHPBB3-10003
| * [ticket/10003] Ported 54c22ae52a0e18232cac8fed342ea52f2e2a793d to db_tools.Oleg Pudeyev2011-04-291-1/+109
| | | | | | | | | | | | This diff applied cleanly. PHPBB3-10003
| * [ticket/10003] Ported 96a30afcca3ebd832c9b3083bb5c9a9f2a2dc54b to db_tools.Oleg Pudeyev2011-04-291-2/+4
| | | | | | | | | | | | This change is somewhat questionable, maybe it should be reviewed. PHPBB3-10003
| * [ticket/10003] Ported d7d96223e7bae7cd60b13c6e7896d95838c3633c to db_tools.Oleg Pudeyev2011-04-291-2/+7
| | | | | | | | PHPBB3-10003
* | [ticket/9556] Drop php closing tags, add trailing newlineIgor Wiedler2010-11-111-2/+0
|/ | | | | | | | | | | | Closing tags converted using Oleg's script. remove-php-end-tags.py -a . Trailing newlines added using the following where $ext is file extension. find . -type f -name "*.$ext" -print | xargs printf "e %s\nw\n" | ed -s; Extensions: php, css, html, js, xml. PHPBB3-9556
* [ticket/8944] Patch db_tools to support index length for MySQL4Igor Wiedler2010-09-051-1/+17
|
* Support for Microsoft's Native SQL Server Driver for PHP - Patch by Chris ↵Nils Adermann2010-02-111-2/+49
| | | | | | | | | | | | | Pucci at Microsoft [Bug #57055] If you are using SQL Server, please try to test this new dbal so we can safely include it in 3.0.8. If you want to try it on a current phpBB version you can apply the latest version of the patch to your board which you can find attached to the bug tracker ticket (look in the comments for the latest version, the one in the ticket itself is outdated): http://www.phpbb.com/bugs/phpbb3/ticket.php?ticket_id=57055 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10489 89ea8834-ac86-4346-8a33-228a782c2dd0
* Database updater now separates ADD COLUMN from SET NOT NULL and SET DEFAULT, ↵Nils Adermann2010-01-261-1/+23
| | | | | | when using PostgreSQL <= 7.4 [Bug #54435] git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10446 89ea8834-ac86-4346-8a33-228a782c2dd0
* Several fixes:Meik Sievertsen2009-10-301-1/+1
| | | | | | | | Fix Bug #53335 Fix wrong unique index fetch for oracle and sqlite Fix alter column definition for firebird (although the query will fail in these circumstances [primary key] because firebird (again) does not support simple things... although... mssql/oracle having the same "problems", but there you are able to do more advanced queries) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10248 89ea8834-ac86-4346-8a33-228a782c2dd0