(self, connection, cursor)
Create database tables
        :return:
Create database tables
        :return:
Create database tables : return :
def init_database(self, connection, cursor):
        """
        Create database tables
        :return:
        """

        # TYPES
        cursor.execute('''CREATE TABLE asset_types (
                        id integer primary key autoincrement,
                        name text,
                        description text
                        )''')

        cursor.execute('''CREATE TABLE file_types (
                        id integer primary key autoincrement,
                        name text,
                        description text
                        )''')

        # MAIN ITEMS
        cursor.execute('''CREATE TABLE projects (
                        id integer primary key autoincrement,
                        name text,
                        houdini_build text,
                        width integer,
                        height integer,
                        description text
                        )''')

        cursor.execute('''CREATE TABLE assets (
                        id integer primary key autoincrement,
                        name text,
                        project integer,
                        type integer,
                        description text,
                        FOREIGN KEY(project) REFERENCES projects(id)
                        FOREIGN KEY(type) REFERENCES asset_types(id)
                        )''')

        cursor.execute('''CREATE TABLE sequences (
                        id integer primary key autoincrement,
                        name text,
                        project integer,
                        description text,
                        FOREIGN KEY(project) REFERENCES projects(id)
                        )''')

        cursor.execute('''CREATE TABLE shots (
                        id integer primary key autoincrement,
                        name text,
                        sequence integer,
                        start_frame integer,
                        end_frame integer,
                        width integer, 
                        height integer,
                        description text,
                        FOREIGN KEY(sequence) REFERENCES sequences(id)
                        )''')

        # FILES
        cursor.execute('''CREATE TABLE asset_files (
                        id integer primary key autoincrement,
                        type integer,
                        asset integer,
                        snapshot integer,
                        description text,
                        FOREIGN KEY(type) REFERENCES file_types(id)
                        FOREIGN KEY(asset) REFERENCES assets(id)
                        FOREIGN KEY(snapshot) REFERENCES asset_snapshots(id)
                        )''')

        cursor.execute('''CREATE TABLE shot_files (
                        id integer primary key autoincrement,
                        type integer,
                        shot integer,
                        snapshot integer,
                        description text,
                        FOREIGN KEY(type) REFERENCES file_types(id)
                        FOREIGN KEY(shot) REFERENCES shots(id)
                        FOREIGN KEY(snapshot) REFERENCES shot_snapshots(id)
                        )''')

        # LINKS
        # Link assets to the shots
        cursor.execute('''CREATE TABLE shot_assets (
                        id integer primary key autoincrement,
                        shot_id integer,
                        asset_id integer,
                        FOREIGN KEY(shot_id) REFERENCES shots(id)
                        FOREIGN KEY(asset_id) REFERENCES assets(id)
                        )''')

        # SNAPSHOTS
        cursor.execute('''CREATE TABLE asset_snapshot (
                        id integer primary key autoincrement,
                        asset_name text,
                        asset_id text,
                        asset_version text,
                        description text
                        )''')

        connection.commit()
def init_database ( self , connection , cursor ) : # TYPES cursor . execute ( '''CREATE TABLE asset_types (
                        id integer primary key autoincrement,
                        name text,
                        description text
                        )''' ) cursor . execute ( '''CREATE TABLE file_types (
                        id integer primary key autoincrement,
                        name text,
                        description text
                        )''' ) # MAIN ITEMS cursor . execute ( '''CREATE TABLE projects (
                        id integer primary key autoincrement,
                        name text,
                        houdini_build text,
                        width integer,
                        height integer,
                        description text
                        )''' ) cursor . execute ( '''CREATE TABLE assets (
                        id integer primary key autoincrement,
                        name text,
                        project integer,
                        type integer,
                        description text,
                        FOREIGN KEY(project) REFERENCES projects(id)
                        FOREIGN KEY(type) REFERENCES asset_types(id)
                        )''' ) cursor . execute ( '''CREATE TABLE sequences (
                        id integer primary key autoincrement,
                        name text,
                        project integer,
                        description text,
                        FOREIGN KEY(project) REFERENCES projects(id)
                        )''' ) cursor . execute ( '''CREATE TABLE shots (
                        id integer primary key autoincrement,
                        name text,
                        sequence integer,
                        start_frame integer,
                        end_frame integer,
                        width integer, 
                        height integer,
                        description text,
                        FOREIGN KEY(sequence) REFERENCES sequences(id)
                        )''' ) # FILES cursor . execute ( '''CREATE TABLE asset_files (
                        id integer primary key autoincrement,
                        type integer,
                        asset integer,
                        snapshot integer,
                        description text,
                        FOREIGN KEY(type) REFERENCES file_types(id)
                        FOREIGN KEY(asset) REFERENCES assets(id)
                        FOREIGN KEY(snapshot) REFERENCES asset_snapshots(id)
                        )''' ) cursor . execute ( '''CREATE TABLE shot_files (
                        id integer primary key autoincrement,
                        type integer,
                        shot integer,
                        snapshot integer,
                        description text,
                        FOREIGN KEY(type) REFERENCES file_types(id)
                        FOREIGN KEY(shot) REFERENCES shots(id)
                        FOREIGN KEY(snapshot) REFERENCES shot_snapshots(id)
                        )''' ) # LINKS # Link assets to the shots cursor . execute ( '''CREATE TABLE shot_assets (
                        id integer primary key autoincrement,
                        shot_id integer,
                        asset_id integer,
                        FOREIGN KEY(shot_id) REFERENCES shots(id)
                        FOREIGN KEY(asset_id) REFERENCES assets(id)
                        )''' ) # SNAPSHOTS cursor . execute ( '''CREATE TABLE asset_snapshot (
                        id integer primary key autoincrement,
                        asset_name text,
                        asset_id text,
                        asset_version text,
                        description text
                        )''' ) connection . commit ( )