I'll have to dig into it but a dsl.truncate(...) on a Table object seems to 
remove no data. 

On Monday, May 15, 2017 at 8:28:56 AM UTC-7, Lukas Eder wrote:
>
> What's not working?
>
> 2017-05-15 17:27 GMT+02:00 <[email protected] <javascript:>>:
>
>> I'm also seeing ctx.truncate(...) not work but I wonder if that's because 
>> I'm using a Mapped Schema for testing?
>>
>>
>> On Monday, May 15, 2017 at 7:16:06 AM UTC-7, [email protected] 
>> wrote:
>>>
>>> Ah yes,so maybe a bug. The actual MySQL CREATE TABLE dump looks like 
>>> this:
>>>
>>> CREATE TABLE acceptable_uses
>>> (
>>>   id INT(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
>>>   terms_and_conditions_id INT(11),
>>>   policy BLOB NOT NULL,
>>>   created_at DATETIME NOT NULL,
>>>   updated_at DATETIME NOT NULL
>>> );
>>>
>>> But what jOOQ spits out is this, which seems to be giving an error 
>>> around 'constraint' for my version of MySQL.
>>>
>>> create table `cloudability_dev`.`acceptable_uses`(
>>>   `id` int not null,
>>>   `terms_and_conditions_id` int null,
>>>   `policy` blob not null,
>>>   `created_at` timestamp not null,
>>>   `updated_at` timestamp not null,
>>>   constraint `KEY_acceptable_uses_PRIMARY`
>>>     primary key (`id`)
>>> );
>>>  
>>> I'm more of a postgres guy but I think the errors are changing the type 
>>> to to timestamp and the constraint syntax. Also looks to be an issue around 
>>> auto increment. Maybe jOOQ could capture the actual DDL it uses during 
>>> generation and just ave those snippets as resources rather than 
>>> re-reversing the DDL from the classes?
>>>
>>> Not a super huge issue for me, I can just take a Copy And Pate the DDL 
>>> from JetBrains DataGrip for the production database, but this would have 
>>> been simpler. 
>>>
>>> On Sunday, May 14, 2017 at 10:17:54 AM UTC-7, Lukas Eder wrote:
>>>>
>>>> Hi Robert,
>>>>
>>>> Thanks for your message. That's correct API usage (in principle), but 
>>>> perhaps you've encountered a bug?
>>>> What's the problem you're getting?
>>>> One thing I'm aware of is incorrect DDL being generated for MySQL enum 
>>>> types: 
>>>> https://github.com/jOOQ/jOOQ/issues/5299
>>>>
>>>> Lukas
>>>>
>>>>
>>>> 2017-05-14 16:32 GMT+02:00 <[email protected]>:
>>>>
>>>>> What's the best way to use jOOQ to generate a local database? I tried 
>>>>> this and get some errors in MySQL. The jOOQ code is generated from a 
>>>>> MySQL 
>>>>> db.
>>>>>
>>>>> sql.ddl(DefaultCatalog.DEFAULT_CATALOG).stream().forEach(sql::execute);
>>>>>
>>>>>
>>>>> So I'm probably using the wrong syntax (maybe order of DDL queries)? 
>>>>> Or maybe this just isn't possible with jOOQ?
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "jOOQ User Group" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to