[TxMt] Looking for a Bundle

Brad Miller bonelake at mac.com
Sun Mar 19 22:51:51 UTC 2006


David,

Here's an example of a snippet for creating a table:  You can try  
this out by going to the bundle editor and adding a snippet to the  
SQL bundle.  Replace all the explanation with the following:

create table ${1:tableName} (
	${2:column}	${3:type}		${4:null}		${5:default ${6:null}},
	primary key ($2),
) ;

Notice that the primary key defaults to the first column you create  
and is automatically filled in as soon as you make fill in the name  
for the column.

Give the snippet a tab trigger like create and scope of source.sql

You could add a foreign key snippet using something like this:

${1:column} references ${2:otherTable} ($1)

I don't know anything about peopleSync so I'm not sure if this is  
what you were thinking of...

Brad

On Mar 19, 2006, at 3:57 PM, David Newberger wrote:

> I would like to be able to do the following
>
> 1. Create Tables
> 2. Create Columns
> 3. Create drop table statements
> 4. Create foregin keys
>
> a example of this would be:
>
> drop table if exists <table name>;
>
> create table <table> (
>   <column>	<type>	<null>	<default>,
> ) ;
>
> I like the syncPeople implementation for RoR migration and this is  
> something I would like to do just for MySQL syntax. I know it seems  
> like something that would be borderline for productivity increases  
> but when you write as many DDL files as I do it would be a life  
> saver and since I am just starting with textmate and mac in general  
> I am trying to figure out the best way to do it.
>
>
> On Mar 19, 2006, at 3:43 PM, Brad Miller wrote:
>
>> David,
>>
>> What kind of help?  What would you like the bundle to do for you?
>>
>> It would be pretty easy to create a Snippet that would expand into  
>> a create table statement template...
>>
>>
>> Brad
>>
>> On Mar 19, 2006, at 3:16 PM, David Newberger wrote:
>>
>>> Hi All,
>>>
>>> 	I have been using textmate for a little over a week now and I  
>>> love the program. I have been using it for mostly RoR and HTML  
>>> Development but I am looking for a bundle that will help me  
>>> create MySQL DDL files. Any Ideas?
>>>
>>> David Newberger
>>>
>>> ____________________________________________________________________ 
>>> __
>>> For new threads USE THIS: textmate at lists.macromates.com
>>> (threading gets destroyed and the universe will collapse if you  
>>> don't)
>>> http://lists.macromates.com/mailman/listinfo/textmate
>>
>>
>> _____________________________________________________________________ 
>> _
>> For new threads USE THIS: textmate at lists.macromates.com
>> (threading gets destroyed and the universe will collapse if you  
>> don't)
>> http://lists.macromates.com/mailman/listinfo/textmate
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate




More information about the textmate mailing list