Yii skeleton app

Thanks Bios,

I have registered three issues.

thanks Jonah it works perfect now!

I can't say that i've encountered the problems that mocapapa has seen.

Quote

Thanks Bios,

I have registered three issues.

One fixed and closed, One I'm testing still and the uppercase Database bug is strange… But i had to use caps too so your not alone.



The table "User" for active record class "User" cannot be found in the database.





01713:             throw new CDbException(Yii::t('yii','The table "{table}" for


active record class "{class}" cannot be found in the database.',





system.db.CDbCommand  	query with SQL: SHOW COLUMNS FROM `User`


Looking at the docs, I’m beginning to think this isn’t a bug but intended.

EDIT: I'm declaring this a bug with the SQL script, And not a bug with the Skeleton. The demo scripts all use Capitalized names.

Thanks for getting that up Bios Element

I will also watch the bug list and make fixes in my version (and possibly send the fixes to you, not sure yet).  I can't help but reply to messages on this thread but I really need to get some homework done and thus resisting the urge to spend some time to figure out sub-version and google code

I would like qiang to make a comment on the table case issue before fixing it (I like table to be lower case).

I will try to figure out SVN before working on the skeleton anymore if I can help it

And I would like to remind everyone that the skeleton requires the current nightly version of Yii (if not the svn version)

Quote

Thanks for getting that up Bios Element

I will also watch the bug list and make fixes in my version (and possibly send the fixes to you, not sure yet).  I can't help but reply to messages on this thread but I really need to get some homework done and thus resisting the urge to spend some time to figure out sub-version and google code

I would like qiang to make a comment on the table case issue before fixing it (I like table to be lower case).

I will try to figure out SVN before working on the skeleton anymore if I can help it

And I would like to remind everyone that the skeleton requires the current nightly version of Yii (if not the svn version)

Yep, PM me your E-mail and I'll add you as a owner. The fix i did for the database is easy to reverse if it's a bug. But from all the docs i read it uses uppercase. SVN shouldn't be too hard to figure out. PM me any questions you have.

Quote

Quote

For me it works with the tables as under-case... And I'm not sure why Yii is making the first letter capital, within the app all the tables are written in lower-case.

Could it be a mysql setting that turns on case-sensitivity?

I am not sure about that. Would some one please describe this case sensitivity?

One thing I can think of is that the original entry script seems to be for Windows; though I am using not WAMP but LAMP, this issue may come from Windows.

Quote

One thing I can think of is that the original entry script seems to be for Windows; though I am using not WAMP but LAMP, this issue may come from Windows.

Nah, I'm using Ubuntu Linux with Apache2 and it does the same thing.

Quote

Quote

One thing I can think of is that the original entry script seems to be for Windows; though I am using not WAMP but LAMP, this issue may come from Windows.

Nah, I'm using Ubuntu Linux with Apache2 and it does the same thing.

Let me clarify again.

What I am saying is…

  • Linux(My situation):

        I have to change the table name 'user' to 'User'. There is a issue on the original code.

  • Windows(though I have not tested):

      Jonah seems to be OK for using the table 'user'. There is NOT an issue on the original code.

You are using Linux, there may be an issue. And I should have said "This case sensitibity may come from windows" instead.

Is this make sense?

Quote

Let me clarify again.

What I am saying is…

  • Linux(My situation):

        I have to change the table name 'user' to 'User'. There is a issue on the original code.

  • Windows(though I have not tested):

      Jonah seems to be OK for using the table 'user'. There is NOT an issue on the original code.

You are using Linux, there may be an issue. And I should have said "This case sensitibity may come from windows" instead.

Is this make sense?

The thought is good but there shouldn't be a difference between mysql ran on linux or on Windows. It's still mysql. Just packaged up differently.

I have finally figured out how to get google code to work for me (turns out I was already almost there).

I have the project up also at

http://code.google.c…ii-skeleton-app

So how should we do this?  Should we keep these projects separate or combine them?

(btw Bios Element  I would be more than glad to give you full access to my project if you like)

We may have different views about certain things, so if you want to stay separate I understand.  You may even keep an eye on my project and copy the modification over to your project as they come if you like.  Whatever you want to do.

BTW, is it possible to hide certain files from being re-uploaded to google even though they have been changed? It would be useful to do this for the index file which contains the path to Yii

Quote

I have finally figured out how to get google code to work for me (turns out I was already almost there).

I have the project up also at

http://code.google.c…ii-skeleton-app

So how should we do this?  Should we keep these projects separate or combine them?

(btw Bios Element  I would be more than glad to give you full access to my project if you like)

We may have different views about certain things, so if you want to stay separate I understand.  You may even keep an eye on my project and copy the modification over to your project as they come if you like.  Whatever you want to do.

BTW, is it possible to hide certain files from being re-uploaded to google even though they have been changed? It would be useful to do this for the index file which contains the path to Yii

Well since some revisions and bug reports have already been made on the version I made, Why don’t I give you owner access to that one. We can always make branches within the project If we need to. But I think we follow the same ideas. :)

And you can, It depends on what program your using for SVN and Since I don't really use Windows, I can't really help you with that. >.> But you can set a file to not be Revision Controlled.

Quote

The thought is good but there shouldn't be a difference between mysql ran on linux or on Windows. It's still mysql. Just packaged up differently.

All right, as I do not know much about WAMP, I just keep silent.

This seems to be quite nice, the only thing is that it might not be a good idea to have 2 branches already…

About the typecasting: Yes, there is an issue that Linux makes a difference in UC/LC, Windows does not. For the urls there is a solution: 'caseSensitive'=>false, but not for database tables.

Yii will always use tablenames with UCFirst. To get past that define the tablename in the model, but to be consistent please use 'Tablename' instead of 'tablename'.

[boring lecture mode]

So in general use the Yii standard notation (even if you don't agree with it), especially ppl developing in Windows/WAMP environments. If not, chances are your code won't work once uploaded to a Linux host.

[/boring lecture mode]

Quote

This seems to be quite nice, the only thing is that it might not be a good idea to have 2 branches already...

About the typecasting: Yes, there is an issue that Linux makes a difference in UC/LC, Windows does not. For the urls there is a solution: 'caseSensitive'=>false, but not for database tables.

Yii will always use tablenames with UCFirst. To get past that define the tablename in the model, but to be consistent please use 'Tablename' instead of 'tablename'.

[boring lecture mode]

So in general use the Yii standard notation (even if you don't agree with it), especially ppl developing in Windows/WAMP environments. If not, chances are your code won't work once uploaded to a Linux host.

[/boring lecture mode]

Already? >.> No one is branching anything yet. But if there comes a feature or system that we disagree on, A Branch is simple enough to make.

Of course we're trying to use the Yii Convention, It's just kinda hard to figure out since I don't think it actually states UC anywhere in the docs. >.>

I’m opening another bug report on this and I’ll go dig through and try to find all the lowercase declarations. Anyone who wants to help is more then welcome to do so. :)

@Maxximus

Thanks for the clarification.  Unless qiang changes the convention I will change the tables to UC

@Bios Element

Quote

Well since some revisions and bug reports have already been made on the version I made, Why don't I give you owner access to that one. We can always make branches within the project If we need to. But I think we follow the same ideas. :)

And you can, It depends on what program your using for SVN and Since I don't really use Windows, I can't really help you with that. >.> But you can set a file to not be Revision Controlled.

We'll I already fixed the bugs in my SVN that were in yours + have some other things changed up… I can also make you a "Project Owners" of it, not simply just a "project member". pm me if interested

The convention for table names is just a recommendation. You may override this convention easily with the tableName() method.

Quote

The convention for table names is just a recommendation. You may override this convention easily with the tableName() method.

Good to hear. But for a Skeleton app, It's probably best to keep things following convention so that it can be merged into existing projects by other devs easily.

http://dev.mysql.com…ensitivity.html

You were right the case sensitivity is different across different OS.

I just tried to change the table name in my DB to uppercase but it is not letting me.

I did some research and it seems I have a setting (this is a default setting for windows) that does not allow for uppercase table names.

Instead of enforcing all windows users to change that setting, wouldn't it be better to change the Yii default to lowercase & encourage that instead?

On windows the default is:

Quote

Table names are stored in lowercase on disk and name comparisons are not case sensitive. MySQL converts all table names to lowercase on storage and lookup. This behavior also applies to database names and table aliases.

On unix:

Quote

Table and database names are stored on disk using the lettercase specified in the CREATE TABLE or CREATE DATABASE statement. Name comparisons are case sensitive. Note that if you force this variable to 0 with --lower-case-table-names=0 on a case-insensitive file system and access MyISAM tablenames using different lettercases, index corruption may result.

on os x

Quote

Table and database names are stored on disk using the lettercase specified in the CREATE TABLE or CREATE DATABASE statement, but MySQL converts them to lowercase on lookup. Name comparisons are not case sensitive. This works only on file systems that are not case sensitive! InnoDB table names are stored in lowercase, as for lower_case_table_names=1.

Quote

Instead of enforcing all windows users to change that setting, wouldn't it be better to change the Yii default to lowercase & encourage that instead?

Actually you have a point, I "think" Yii is the only framework using Uppercase and this might just be why. >.>