Skip to content
This repository was archived by the owner on Nov 7, 2020. It is now read-only.
This repository was archived by the owner on Nov 7, 2020. It is now read-only.

initdb making wrong schema call? #10

Open
@ghost

Description

Created by Kevin van Zonneveld, 22nd Sep 2010. (originally Lighthouse ticket #30):


Hi guys.

Just tried out api_generator but couldn't get it to work.
When running:

[kevin`@dev` /app/cakephp/cake/console (master +)]$ ./cake api_index initdb

I get:

Welcome to CakePHP v1.2.6 Console
---------------------------------------------------------------
App : app
Path: /app/cakephp/app
---------------------------------------------------------------
Cake Schema Shell
---------------------------------------------------------------
The Schema Shell generates a schema object from
the database and updates the database from the schema.
---------------------------------------------------------------
Usage: cake schema <command> <arg1> <arg2>...
---------------------------------------------------------------
Params:

    -connection <config>
        set db config <config>. uses 'default' if none is specified

    -path <dir>
        path <dir> to read and write schema.php.
        default path: /app/cakephp/app/config/sql

    -name <name>
        classname to use.

    -file <name>
        file <name> to read and write.
        default file: api_generator.php

    -s <number>
        snapshot <number> to use for run.

    -dry
        Perform a dry run on 'run' commands.
        Queries will be output to window instead of executed.

    -f
        force 'generate' to create a new schema.
Commands:

    schema help
        shows this help message.

    schema view
        read and output contents of schema file

    schema generate
        reads from 'connection' writes to 'path'
        To force generation of all tables into the schema, use the -f param.
        Use 'schema generate snapshot <number>' to generate snapshots
        which you can use with the -s parameter in the other operations.

    schema dump <filename>
        Dump database sql based on schema file to <filename>. 
        If <filename> is write, schema dump will be written to a file
        that has the same name as the app directory.

    schema run create <schema> <table>
        Drop and create tables based on schema file
        optional <schema> arg for selecting schema name
        optional <table> arg for creating only one table
        pass the -s param with a number to use a snapshot
        To see the changes, perform a dry run with the -dry param

    schema run update <schema> <table>
        alter tables based on schema file
        optional <schema> arg for selecting schema name.
        optional <table> arg for altering only one table.
        To use a snapshot, pass the -s param with the snapshot number
        To see the changes, perform a dry run with the -dry param

Looks like it's making an invalid call to schema?
I'm using Cake 1.2.6 and checked out master of http://github.com/cakephp/api_generator in app/plugins/(api_generator)

When I run:

./cake api_index

I do get a valid shell:

Api Generator Class Index Generation
---------------------------------------------------------------
Available commands:
  initdb
    Create the schema used for the Api Generator Plugin
  showfiles
    Show the list of files that will be parsed for classes based on your configuration.
    Use to check if your config is going to parse the files you want.
  update
    Clear the existing class index and regenerate it.
  set_routes
    Add routes for Api generator to your routes file.
  users
    View list of users, and create new ones.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions