Commit 52c6480b authored by Fabien Potencier's avatar Fabien Potencier

merged branch mageekguy/master (PR #471)

Commits
-------

6d3e410b Use $app['db'] instead of $conn and add autoinc

Discussion
----------

Use $app['db’] instead of $conn and add an auto increment

`$conn` is not `$this->conn`and is identical to `$app['db'].
Moreover, column `id` must be auto-increment.

---------------------------------------------------------------------------

by igorw at 2012-08-28T13:08:50Z

Apart from that thing, looks good. 👍

---------------------------------------------------------------------------

by fabpot at 2012-08-29T13:06:24Z

Can you squash your commits before I merge? Thanks.

---------------------------------------------------------------------------

by stof at 2012-08-29T19:55:15Z

@mageekguy when squashing, you need to force the push after that. Here, you merged your remote branch, meaning you kept all the older commits as well.

---------------------------------------------------------------------------

by mageekguy at 2012-08-29T20:06:49Z

Know it, but my push was refused because not fast-forward.
So i pull and push, with this result.
And i don't kown what to do know :/.

---------------------------------------------------------------------------

by igorw at 2012-08-29T20:32:21Z

You need to force push. Like this: `git push --force origin master`.

---------------------------------------------------------------------------

by stof at 2012-08-29T23:24:27Z

@mageekguy not being a fast-forward is expected when squashing as you are rewriting the history.

And in such case, git tells you about both solutions (merging and forcing the push). You choose the wrong one :)

---------------------------------------------------------------------------

by stof at 2012-08-30T09:42:38Z

hmm, looks like you messed something when rebasing

---------------------------------------------------------------------------

by mageekguy at 2012-08-30T11:13:46Z

Seems to be ok now.
Can you confirm ?

---------------------------------------------------------------------------

by stof at 2012-08-30T11:14:28Z

you still have 2 unrelated commits in the branch

---------------------------------------------------------------------------

by igorw at 2012-08-30T11:51:14Z

Now you need to fix that whitespace issue and it should be mergeable. :)

---------------------------------------------------------------------------

by igorw at 2012-08-30T12:48:02Z

Alright, now it looks good.
parents 5b796aeb 6d3e410b
......@@ -453,10 +453,10 @@ sample users::
use Doctrine\DBAL\Schema\Table;
$schema = $conn->getSchemaManager();
$schema = $app['db']->getSchemaManager();
if (!$schema->tablesExist('users')) {
$users = new Table('users');
$users->addColumn('id', 'integer', array('unsigned' => true));
$users->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true));
$users->setPrimaryKey(array('id'));
$users->addColumn('username', 'string', array('length' => 32));
$users->addUniqueIndex(array('username'));
......@@ -465,8 +465,8 @@ sample users::
$schema->createTable($users);
$this->conn->executeQuery('INSERT INTO users (username, password, roles) VALUES ("fabien", "5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==", "ROLE_USER")');
$this->conn->executeQuery('INSERT INTO users (username, password, roles) VALUES ("admin", "5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==", "ROLE_ADMIN")');
$app['db']->executeQuery('INSERT INTO users (username, password, roles) VALUES ("fabien", "5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==", "ROLE_USER")');
$app['db']->executeQuery('INSERT INTO users (username, password, roles) VALUES ("admin", "5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==", "ROLE_ADMIN")');
}
.. tip::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment