The FOSUserBundle provides user management for your Symfony2 Project, adding database support for storing those users. Here I will facilitate the SQL script for creating the users table.

The documentation for the bundle specifies different ways to update your database schema according to the User entity depending your database engine:

$ php app/console doctrine:schema:update --force

$ php app/console doctrine:mongodb:schema:create --index

$ php app/console propel:build

However, there may be cases where you just want to create the structure on your own and not use one of those commands. For those cases, and for those who might find it useful, here is the SQL script for creating the Users table:

CREATE TABLE fos_users (
    id INT(11) NOT NULL AUTO_INCREMENT,
    username VARCHAR(255) NOT NULL,
    username_canonical VARCHAR(255) NOT NULL,
    email VARCHAR(255) NOT NULL,
    email_canonical VARCHAR(255) NOT NULL,
    enabled tinyint(1) NOT NULL,
    salt VARCHAR(255) NOT NULL,
    password VARCHAR(255) NOT NULL,
    last_login datetime DEFAULT NULL,
    locked tinyint(1) NOT NULL,
    expired tinyint(1) NOT NULL,
    expires_at datetime DEFAULT NULL,
    confirmation_token VARCHAR(255)DEFAULT NULL,
    password_requested_at datetime DEFAULT NULL,
    roles longtext NOT NULL COMMENT '(DC2Type:array)',
    credentials_expired tinyint(1) NOT NULL,
    credentials_expire_at datetime DEFAULT NULL,
    PRIMARY KEY (id),
    UNIQUE KEY UNIQ_1483A5E992FC23A8 (username_canonical),
    UNIQUE KEY UNIQ_1483A5E9A0D96FBF (email_canonical)
) ENGINE=InnoDB;

(the script is for MySQL)